Skip to content

Behavior.Entity Property

Definition

Namespace: Brine2D.ECS

The entity this behavior is attached to.

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

Property Value

Entity

Remarks

null after the behavior has been detached via RemoveBehavior<T>() or when the owning entity is destroyed. Check this property before accessing entity state from outside the normal Update/FixedUpdate/Render lifecycle \(e\.g\., from event callbacks or cached references\).