RelationExtensions.RemoveRelation_TRelation,TKey_(thisEntity,TKey).md
November 22, 2024 ยท View on GitHub
Friflo.Engine.ECS
Friflo.Engine.ECS.RelationExtensions
RelationExtensions.RemoveRelation<TRelation,TKey>(this Entity, TKey) Method
Removes the relation with the specified key from an entity.
Executes in O(N) N: number of relations of the specific entity.
public static bool RemoveRelation<TRelation,TKey>(this Friflo.Engine.ECS.Entity entity, TKey key)
where TRelation : struct, Friflo.Engine.ECS.IRelation<TKey>, System.ValueType, System.ValueType;
Type parameters
TRelation
TKey
Parameters
entity Entity
key TKey
Returns
System.Boolean
true if the entity contained a relation of the given type before.
Exceptions
System.NullReferenceException
If the entity is null.