RelationExtensions.GetAllEntitiesWithRelations_TRelation_(thisEntityStore).md

December 3, 2024 ยท View on GitHub

Friflo.Engine.ECS

Friflo.Engine.ECS.RelationExtensions

RelationExtensions.GetAllEntitiesWithRelations(this EntityStore) Method

Obsolete: Use Entities
Returns a collection of entities having one or more relations of the specified TRelation type.
Executes in O(1).

public static Friflo.Engine.ECS.EntityReadOnlyCollection GetAllEntitiesWithRelations<TRelation>(this Friflo.Engine.ECS.EntityStore store)
    where TRelation : struct, Friflo.Engine.ECS.IRelation, System.ValueType, System.ValueType;

Type parameters

TRelation

Parameters

store EntityStore

Returns

EntityReadOnlyCollection

Remarks

  • The returned collection changes when relations are updated, removed or added.
  • To get all entities including their relations (the cartesian product aka CROSS JOIN) use
    Pairs