Skip to content

Component.Entity Property

Definition

Namespace: Brine2D.ECS

The entity this component is attached to.

public Brine2D.ECS.Entity? Entity { get; internal set; }

Property Value

Entity

Remarks

Set to null when the component is removed from its entity via Brine2D.ECS.Entity.RemoveComponent<> or entity destruction. If you cache a component reference beyond the current frame, check this property before accessing entity state through it.