Skip to content

Entity.GetComponentInChildren() Method

Definition

Namespace: Brine2D.ECS

Gets a component on this entity or any of its children \(depth\-first recursive search\).

C#
public T? GetComponentInChildren<T>()
    where T : Brine2D.ECS.Component;

Type parameters

T

Returns

T

Remarks

Useful for equipment hierarchies, scene graphs, and bone structures. This is O\(depth x children\). Avoid calling on hot paths or deep hierarchies.