docs.unity.cn
    Show / Hide Table of Contents

    Struct StorageInfoFromEntity

    A [NativeContainer] that provides access to information about how Entities are stored. Entity.

    Namespace: Unity.Entities
    Syntax
    [NativeContainer]
    [NativeContainerIsReadOnly]
    public struct StorageInfoFromEntity
    Remarks

    StorageInfoFromEntity is a native container that provides access to information about how Entities are stored. You can use StorageInfoFromEntity to look up data associated with one entity while iterating over a different set of entities.

    To get a StorageInfoFromEntity, call GetStorageInfoFromEntity().

    Pass a StorageInfoFromEntity container to a job by defining a public field of the appropriate type in your IJob implementation. You can safely read from StorageInfoFromEntity in any job, and the StorageInfoFromEntity will never write data.

    If you would like to access an entity's storage information outside of a job, consider using the EntityManager methods GetStorageInfo(Entity) instead, to avoid the overhead of creating a StorageInfoFromEntity object.

    Properties

    Name Description
    Item[Entity]

    Gets an EntityStorageInfo for the specified entity.

    Methods

    Name Description
    Exists(Entity)

    Reports whether the specified Entity instance still refers to a valid entity.

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Wednesday, July 6, 2022
    Terms of use