docs.unity3d.com
    Show / Hide Table of Contents

    Struct ArchetypeChunk

    A block of unmanaged memory containing the components for entities sharing the same Archetype.

    Namespace: Unity.Entities
    Syntax
    public struct ArchetypeChunk : IEquatable<ArchetypeChunk>

    Properties

    Name Description
    Archetype

    The archetype of the entities stored in this chunk.

    BatchEntityCount

    If the ArchetypeChunk is sub-batched, returns the number of entities referenced by this batch.

    Capacity

    The number of entities that can fit in this chunk.

    ChunkEntityCount

    The number of entities currently stored in the chunk (ignoring any sub-batching)

    Count

    If the ArchetypeChunk is not sub-batched, returns the number of entities in the chunk. Otherwise, returns the number of entities referenced by this batch.

    Full

    Whether this chunk is exactly full.

    Null

    A special "null" ArchetypeChunk that you can use to test whether ArchetypeChunk instances are valid.

    Methods

    Name Description
    DidChange(DynamicComponentTypeHandle, UInt32)

    Reports whether the data in any of IComponentData components in the chunk, of the type identified by chunkComponentType, could have changed since the specified version.

    DidChange(DynamicSharedComponentTypeHandle, UInt32)

    Reports whether the value of shared components associated with the chunk, of the type identified by chunkSharedComponentData, could have changed since the specified version.

    DidChange<T>(BufferTypeHandle<T>, UInt32)

    Reports whether any of the data in dynamic buffer components in the chunk, of the type identified by chunkBufferTypeHandle, could have changed since the specified version.

    DidChange<T>(ComponentTypeHandle<T>, UInt32)

    Reports whether the data in any of IComponentData components in the chunk, of the type identified by chunkComponentTypeHandle, could have changed since the specified version.

    DidChange<T>(SharedComponentTypeHandle<T>, UInt32)

    Reports whether the value of shared components associated with the chunk, of the type identified by chunkSharedComponentData, could have changed since the specified version.

    DidOrderChange(UInt32)

    Reports whether a structural change has occured in this chunk since the specified version.

    Equals(Object)

    Two ArchetypeChunk instances are equal if they reference the same block of chunk memory.

    Equals(ArchetypeChunk)

    Two ArchetypeChunk instances are equal if they reference the same block of chunk and entity component store memory.

    GetBufferAccessor<T>(BufferTypeHandle<T>)
    GetChangeVersion(DynamicComponentTypeHandle)

    Gets the change version number assigned to the specified type of component in this chunk.

    GetChangeVersion(DynamicSharedComponentTypeHandle)

    Gets the change version number assigned to the specified type of shared component in this chunk.

    GetChangeVersion<T>(BufferTypeHandle<T>)

    Gets the change version number assigned to the specified type of dynamic buffer component in this chunk.

    GetChangeVersion<T>(ComponentTypeHandle<T>)

    Gets the change version number assigned to the specified type of component in this chunk.

    GetChangeVersion<T>(SharedComponentTypeHandle<T>)

    Gets the change version number assigned to the specified type of shared component in this chunk.

    GetChunkComponentData<T>(ComponentTypeHandle<T>)

    Gets the value of a chunk component.

    GetDynamicComponentDataArrayReinterpret<T>(DynamicComponentTypeHandle, Int32)
    GetHashCode()

    Computes a hashcode to support hash-based collections.

    GetManagedComponentAccessor<T>(ComponentTypeHandle<T>, EntityManager)
    GetNativeArray(EntityTypeHandle)

    Provides a native array interface to entity instances stored in this chunk.

    GetNativeArray<T>(ComponentTypeHandle<T>)

    Provides a native array interface to components stored in this chunk.

    GetOrderVersion()

    Gets the order version number assigned to this chunk.

    GetSharedComponentData<T>(SharedComponentTypeHandle<T>, EntityManager)

    Gets the current value of a shared component.

    GetSharedComponentDataBoxed(DynamicSharedComponentTypeHandle, EntityManager)

    Gets the current value of a shared component.

    GetSharedComponentIndex(DynamicSharedComponentTypeHandle)

    Gets the index into the array of unique values for the specified shared component.

    GetSharedComponentIndex<T>(SharedComponentTypeHandle<T>)

    Gets the index into the array of unique values for the specified shared component.

    GetUntypedBufferAccessor(ref DynamicComponentTypeHandle)

    Give unsafe access to the buffers with type chunkBufferTypeHandle in the chunk.

    Has(DynamicComponentTypeHandle)
    Has(DynamicSharedComponentTypeHandle)

    Reports whether this chunk contains a shared component of the specified component type.

    Has<T>(BufferTypeHandle<T>)

    Reports whether this chunk contains a dynamic buffer containing the specified component type.

    Has<T>(ComponentTypeHandle<T>)

    Reports whether this chunk contains the specified component type.

    Has<T>(SharedComponentTypeHandle<T>)

    Reports whether this chunk contains a shared component of the specified component type.

    HasChunkComponent<T>(ComponentTypeHandle<T>)

    Reports whether this chunk contains a chunk component of the specified component type.

    Invalid()

    Reports whether this ArchetypeChunk instance is invalid.

    NumSharedComponents()

    The number of shared components in the archetype associated with this chunk.

    SetChunkComponentData<T>(ComponentTypeHandle<T>, T)

    Sets the value of a chunk component.

    Operators

    Name Description
    Equality(ArchetypeChunk, ArchetypeChunk)

    Two ArchetypeChunk instances are equal if they reference the same block of chunk and entity component store memory.

    Inequality(ArchetypeChunk, ArchetypeChunk)

    Two ArchetypeChunk instances are only equal if they reference the same block of chunk and entity component store memory.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023