Field Index
The ID of an entity.
Namespace: Unity.Entities
Assembly: solution.dll
Syntax
public int Index
Returns
Type | Description |
---|---|
int | The index into the internal list of entities. |
Remarks
Entity indexes are recycled when an entity is destroyed. When an entity is destroyed, the EntityManager increments the version identifier. To represent the same entity, both the Index and the Version fields of the Entity object must match. If the Index is the same, but the Version is different, then the entity has been recycled.