Skip to content

Entity.GetBehaviors() Method

Definition

Namespace: Brine2D.ECS

Gets all behaviors of the specified type \(or a derived type\) attached to this entity.

C#
public System.Collections.Generic.List<T> GetBehaviors<T>()
    where T : Brine2D.ECS.Behavior;

Type parameters

T

Returns

System.Collections.Generic.List<T>

Remarks

Returns a new list on every call. Avoid on hot paths; cache the result or use GetAllBehaviors() and filter manually when performance matters.