Method NextEntityIndexBatch
NextEntityIndexBatch(out int, out int)
Iterates through the given ArchetypeChunk a whole contiguous run of available entities at a
time, rather than one index at a time as NextEntityIndex(out int) does. A run is a set of adjacent slots
that are all available; batching lets a caller process a dense span in one operation. When every entity is
available (the common case) this yields a single run [0, chunk.Count).
Declaration
public bool NextEntityIndexBatch(out int startIndex, out int count)
Parameters
| Type | Name | Description |
|---|---|---|
| int | startIndex | The index of the first entity in the next available run, or -1 when the function returns false. |
| int | count | The number of consecutive available entities in the run. |
Returns
| Type | Description |
|---|---|
| bool | Whether the iteration should continue. |