Struct PooledEntitySlice
Zero-copy window into a PooledEntityList's backing array. Used by parallel QuerySystem dispatch to give each chunk its entity slice without copying.
public readonly struct PooledEntitySlice : IReadOnlyCollection<EntityId>, IEnumerable<EntityId>, IEnumerable
- Implements
- Inherited Members
Remarks
This is a value type — it boxes once when assigned to IReadOnlyCollection<T> (same cost as PooledEntityList). The backing array is NOT owned by this struct; the original PooledEntityList manages its lifetime.
Properties
Count
Number of entities in this chunk slice.
public int Count { get; }
Property Value
this[int]
Access entity by index within this slice.
public EntityId this[int index] { get; }
Parameters
indexint
Property Value
Methods
GetEnumerator()
Value-type enumerator — no allocation.
public PooledEntitySlice.Enumerator GetEnumerator()