EasyEcs
API reference

EntitySpan

The entities of one run of rows in a batch job: element i is the entity whose components are element i of the run's spans.

public readonly ref struct EntitySpan

The entities of one run of rows in a batch job: element i is the entity whose components are element i of the run's spans. A handle is built only when indexed, so a batch that needs the entity of a few rows reads only those rows' ids. Valid for the call it is passed to (a ref struct, like the spans).

Properties

Ids

public ReadOnlySpan<EntityId> Ids { get; }

The ids of the run's entities, read straight from the table (no copy): to store or send them.

Length

public int Length { get; }

Number of entities (the length of the run's spans).

Indexers

this[]

public Entity this[int index] { get; }

The entity of row index of the run. O(1): one 8-byte load.

Edit on GitHub

Last updated on

How is this guide?

On this page