Skip to content

Entity.GetBehaviorInParent() Method

Definition

Namespace: Brine2D.ECS

Gets a behavior of the specified type on this entity or any of its ancestors.

C#
public T? GetBehaviorInParent<T>()
    where T : Brine2D.ECS.Behavior;

Type parameters

T

Returns

T

Remarks

This is O\(depth × behaviors\). Avoid calling on hot paths or deep hierarchies.