ComponentIndex_TIndexedComponent,TValue_.Values.md

December 3, 2024 ยท View on GitHub

Friflo.Engine.ECS

Friflo.Engine.ECS.ComponentIndex<TIndexedComponent,TValue>

ComponentIndex<TIndexedComponent,TValue>.Values Property

Returns all indexed component values of the passed TIndexedComponent type.
Executes in O(1). Each value in the returned list is unique. See remarks for additional infos.

public System.Collections.Generic.IReadOnlyCollection<TValue> Values { get; }

Property Value

System.Collections.Generic.IReadOnlyCollection<TValue>

Remarks

  • The returned collection changes when indexed component values are updated, removed or added.
  • To get the entities having a specific component value use this[TValue].
  • If TValue is a class all collection values are not null.
    Use this[TValue] to check if null is indexed.