RelationExtensions.TryGetRelation_TRelation,TKey_(thisEntity,TKey,TRelation).md
November 22, 2024 ยท View on GitHub
Friflo.Engine.ECS
Friflo.Engine.ECS.RelationExtensions
RelationExtensions.TryGetRelation<TRelation,TKey>(this Entity, TKey, TRelation) Method
Returns the relation of the entity with the given key.
Executes in O(N) N: number of entity relations.
public static bool TryGetRelation<TRelation,TKey>(this Friflo.Engine.ECS.Entity entity, TKey key, out TRelation value)
where TRelation : struct, Friflo.Engine.ECS.IRelation<TKey>, System.ValueType, System.ValueType;
Type parameters
TRelation
TKey
Parameters
entity Entity
key TKey
value TRelation
Returns
Exceptions
System.NullReferenceException
If the entity is null.