Contents

removeAll(keepCapacity:preservingWorldTransforms:)

Removes all children from this entity.

Declaration

@MainActor @preconcurrency func removeAll(keepCapacity: Bool = false, preservingWorldTransforms: Bool = false)

Parameters

  • keepCapacity:

    true to keep the memory reserved for storing the children. false to free the reserved memory.

  • preservingWorldTransforms:

    true to preserve the world transform. false to preserve the relative transform. (Use true if the entities should keep its effective location and size in the scene!)

See Also

Removing entities