EntityData.TryGet_T_(T).md

July 31, 2024 ยท View on GitHub

Friflo.Engine.ECS

Friflo.Engine.ECS.EntityData

EntityData.TryGet(T) Method

Gets the component of the specififed type.
Returns true if the entity contains a component of specified type. Otherwise false.

public bool TryGet<T>(out T value)
    where T : struct, Friflo.Engine.ECS.IComponent, System.ValueType, System.ValueType;

Type parameters

T

Parameters

value T

Returns

System.Boolean

Exceptions

System.NullReferenceException
if the entity is deleted.

Remarks

Executes in O(1)