IndexExtensions.GetAllIndexedComponentValues_TComponent,TValue_(thisEntityStore).md
December 3, 2024 ยท View on GitHub
Friflo.Engine.ECS
Friflo.Engine.ECS.IndexExtensions
IndexExtensions.GetAllIndexedComponentValues<TComponent,TValue>(this EntityStore) Method
Obsolete: Use Values
Returns all indexed component values of the passed TComponent type.
Executes in O(1). Each value in the returned list is unique. See remarks for additional infos.
public static System.Collections.Generic.IReadOnlyCollection<TValue> GetAllIndexedComponentValues<TComponent,TValue>(this Friflo.Engine.ECS.EntityStore store)
where TComponent : struct, Friflo.Engine.ECS.IIndexedComponent<TValue>, System.ValueType, System.ValueType;
Type parameters
TComponent
TValue
Parameters
store EntityStore
Returns
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 referenced.