Contents

entity

The entity that owns this component.

Declaration

weak var entity: GKEntity? { get }

Discussion

Use this property in a component subclass to refer back to the owning entity and its attributes. An entity may be an instance either of the GKEntity class or of a custom subclass. In the latter case, a custom entity class can provide storage for state or resources accessed by multiple components.

See Also

Working with Entities