docs.unity.cn
    Show / Hide Table of Contents

    Field Index

    The ID of an entity.

    Namespace: Unity.Entities
    Syntax
    public int Index
    Returns
    Type Description
    Int32

    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.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023