Skip to content

Entity.GetBehaviorInChildren() Method

Definition

Namespace: Brine2D.ECS

Gets a behavior of the specified type on this entity or any of its children \(depth\-first recursive search\).

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

Type parameters

T

Returns

T

Remarks

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