replaceAll(_:preservingWorldTransforms:)
Removes all children from this entity and adds the specified list of entities as the new children.
Declaration
@MainActor @preconcurrency func replaceAll(_ children: [Entity], preservingWorldTransforms: Bool = false)Parameters
- children:
The list of the new children.
- preservingWorldTransforms:
trueto preserve the world transform.falseto preserve the relative transform. (Usetrueif the entities should keep its effective location and size in the scene!)