Contents

removeChild(_:preservingWorldTransform:)

Removes the given child from the entity.

Declaration

@MainActor @preconcurrency func removeChild(_ entity: Entity, preservingWorldTransform: Bool = false)

Parameters

  • entity:

  • preservingWorldTransform:

    A Boolean that you set to true to preserve the entity’s world transform, or false to preserve its relative transform. Use true when you want a model to keep its effective location and size within a scene.

Discussion

See the HasHierarchy protocol’s definition of removeChild(_:preservingWorldTransform:) for more information.

See Also

Managing children