IndexExtensions.GetIncomingLinks_TComponent_(thisEntity).md

July 6, 2024 ยท View on GitHub

Friflo.Engine.ECS

Friflo.Engine.ECS.IndexExtensions

IndexExtensions.GetIncomingLinks(this Entity) Method

Return the entities with a link component referencing the target entity of the passed ILinkComponent type.
Executes in O(1).

public static Friflo.Engine.ECS.EntityLinks<TComponent> GetIncomingLinks<TComponent>(this Friflo.Engine.ECS.Entity target)
    where TComponent : struct, Friflo.Engine.ECS.ILinkComponent, System.ValueType, System.ValueType;

Type parameters

TComponent

Parameters

target Entity

Returns

Friflo.Engine.ECS.EntityLinks<TComponent>

Exceptions

System.NullReferenceException
If the entity is null.