Contents

children

The child entities that the entity manages.

Declaration

@MainActor @preconcurrency var children: Entity.ChildCollection { get set }

Discussion

An entity can have any number of child entities.

Use the addChild(_:preservingWorldTransform:) method to add a child to an entity. Use the removeChild(_:preservingWorldTransform:) method to remove one from an entity. These methods automatically update the parent properties of the child entities.

See Also

Managing children