docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ArchetypeChunk

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

    Namespace: Unity.Entities
    Assembly: solution.dll
    Syntax
    public struct ArchetypeChunk

    Properties

    Name Description
    Archetype

    The archetype of the entities stored in this chunk.

    Capacity

    The number of entities that can fit in this chunk.

    ChunkEntityCount

    The number of entities currently stored in the chunk.

    Count

    Returns the number of entities in the chunk.

    Full

    Whether this chunk is exactly full.

    Null

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

    SequenceNumber

    SequenceNumber is a unique number for each chunk, across all worlds.

    Methods

    Name Description
    DidChange(DynamicComponentTypeHandle, uint)

    Obsolete. Use DidChange(ref DynamicComponentTypeHandle, uint) instead.

    DidChange(ref DynamicComponentTypeHandle, uint)

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

    DidChange(DynamicSharedComponentTypeHandle, uint)

    Obsolete. Use DidChange(ref DynamicSharedComponentTypeHandle, uint)

    DidChange(ref DynamicSharedComponentTypeHandle, uint)

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

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

    Obsolete. Use DidChange<T>(ref BufferTypeHandle<T>, uint) instead.

    DidChange<T>(ref BufferTypeHandle<T>, uint)

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

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

    Obsolete. Use DidChange<T>(ref ComponentTypeHandle<T>, uint) instead.

    DidChange<T>(ref ComponentTypeHandle<T>, uint)

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

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

    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(uint)

    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>)

    Obsolete. Use GetBufferAccessor<T>(ref BufferTypeHandle<T>) instead.

    GetBufferAccessor<T>(ref BufferTypeHandle<T>)

    Provides access to a chunk's array of component values for a specific buffer component type.

    GetChangeVersion(DynamicComponentTypeHandle)

    Obsolete. Use GetChangeVersion(ref DynamicComponentTypeHandle) instead.

    GetChangeVersion(ref DynamicComponentTypeHandle)

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

    GetChangeVersion(DynamicSharedComponentTypeHandle)

    Obsolete. Use GetChangeVersion(ref DynamicSharedComponentTypeHandle) instead.

    GetChangeVersion(ref DynamicSharedComponentTypeHandle)

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

    GetChangeVersion<T>(BufferTypeHandle<T>)

    Obsolete. Use GetChangeVersion<T>(ref BufferTypeHandle<T>) instead.

    GetChangeVersion<T>(ref BufferTypeHandle<T>)

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

    GetChangeVersion<T>(ComponentTypeHandle<T>)

    Obsolete. Use GetChangeVersion<T>(ref ComponentTypeHandle<T>) instead.

    GetChangeVersion<T>(ref 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>)

    Obsolete. Use GetChunkComponentData<T>(ref ComponentTypeHandle<T>) instead.

    GetChunkComponentData<T>(ref ComponentTypeHandle<T>)

    Gets the value of a chunk component.

    GetComponentDataPtrRO<T>(ref ComponentTypeHandle<T>)

    Provides an unsafe read-only interface to components stored in this chunk.

    GetComponentDataPtrRW<T>(ref ComponentTypeHandle<T>)

    Provides an unsafe read/write interface to components stored in this chunk.

    GetDynamicComponentDataArrayReinterpret<T>(DynamicComponentTypeHandle, int)

    Obsolete. Use GetDynamicComponentDataArrayReinterpret<T>(ref DynamicComponentTypeHandle, int) instead.

    GetDynamicComponentDataArrayReinterpret<T>(ref DynamicComponentTypeHandle, int)

    Construct a NativeArray view of a chunk's component data.

    GetDynamicSharedComponentDataAddress(DynamicSharedComponentTypeHandle)

    Obsolete. Use GetDynamicSharedComponentDataAddress(ref DynamicSharedComponentTypeHandle) instead.

    GetDynamicSharedComponentDataAddress(ref DynamicSharedComponentTypeHandle)

    Provides an unsafe interface to shared components stored in this chunk.

    GetEnableableBits(ref DynamicComponentTypeHandle)

    Gets a copy of all the Enableable bits for the specified type handle.

    GetEnabledMask<T>(ref ComponentTypeHandle<T>)

    Provides a ComponentEnabledMask to the component enabled bits in this chunk.

    GetEntityDataPtrRO(EntityTypeHandle)

    Provides an unsafe read-only interface to array of Entities stored in this chunk.

    GetHashCode()

    Computes a hashcode to support hash-based collections.

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

    Obsolete. Use GetManagedComponentAccessor<T>(ref ComponentTypeHandle<T>, EntityManager) instead.

    GetManagedComponentAccessor<T>(ref ComponentTypeHandle<T>, EntityManager)

    Provides access to a chunk's array of component values for a specific managed component type.

    GetNativeArray(EntityTypeHandle)

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

    GetNativeArray<T>(ComponentTypeHandle<T>)

    Obsolete. Use GetNativeArray<T>(ref ComponentTypeHandle<T>) instead.

    GetNativeArray<T>(ref ComponentTypeHandle<T>)

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

    GetOrderVersion()

    Gets the order version number assigned to this chunk.

    GetRequiredComponentDataPtrRO<T>(ref ComponentTypeHandle<T>)

    Provides an unsafe read-only interface to components stored in this chunk. This variant assumes that the component is present in the chunk; use GetComponentDataPtrRO<T>(ref ComponentTypeHandle<T>) in cases where the caller can't guarantee this.

    GetRequiredComponentDataPtrRW<T>(ref ComponentTypeHandle<T>)

    Provides an unsafe read/write interface to components stored in this chunk. This variant assumes that the component is present in the chunk; use GetComponentDataPtrRW<T>(ref ComponentTypeHandle<T>) in cases where the caller can't guarantee this.

    GetSharedComponentDataBoxed(DynamicSharedComponentTypeHandle, EntityManager)

    Obsolete. Use GetSharedComponentDataBoxed(ref DynamicSharedComponentTypeHandle, EntityManager) instead.

    GetSharedComponentDataBoxed(ref DynamicSharedComponentTypeHandle, EntityManager)

    Gets the current value of a shared component.

    GetSharedComponentDataUnmanaged<T>(SharedComponentTypeHandle<T>)

    Obsolete. Use GetSharedComponent<T>(SharedComponentTypeHandle<T>) instead.

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

    Obsolete. Use GetSharedComponentManaged<T>(SharedComponentTypeHandle<T>, EntityManager) instead.

    GetSharedComponentIndex(DynamicSharedComponentTypeHandle)

    Obsolete. Use GetSharedComponentIndex(ref DynamicSharedComponentTypeHandle) instead.

    GetSharedComponentIndex(ref 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.

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

    Gets the current value of a managed shared component.

    GetSharedComponent<T>(SharedComponentTypeHandle<T>)

    Gets the current value of an unmanaged shared component.

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

    Gets the current value of an unmanaged shared component.

    GetUntypedBufferAccessor(ref DynamicComponentTypeHandle)

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

    Has(DynamicComponentTypeHandle)

    Obsolete. Use Has(ref DynamicComponentTypeHandle) instead.

    Has(ref DynamicComponentTypeHandle)

    Reports whether this chunk contains the specified component type.

    Has(DynamicSharedComponentTypeHandle)

    Obsolete. Use Has(ref DynamicSharedComponentTypeHandle) instead.

    Has(ref DynamicSharedComponentTypeHandle)

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

    HasChunkComponent<T>()

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

    HasChunkComponent<T>(ComponentTypeHandle<T>)

    Obsolete. Use HasChunkComponent<T>(ref ComponentTypeHandle<T>) instead.

    HasChunkComponent<T>(ref ComponentTypeHandle<T>)

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

    Has<T>()

    Reports whether this chunk contains the specified component type.

    Has<T>(BufferTypeHandle<T>)

    Obsolete. Use Has<T>(ref BufferTypeHandle<T>) instead.

    Has<T>(ref BufferTypeHandle<T>)

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

    Has<T>(ComponentTypeHandle<T>)

    Obsolete. Use Has<T>(ref ComponentTypeHandle<T>) instead.

    Has<T>(ref 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.

    Invalid()

    Reports whether this ArchetypeChunk instance is invalid.

    IsComponentEnabled(ref DynamicComponentTypeHandle, int)

    Checks whether a given IBufferElementData is enabled on the specified Entity. For the purposes of EntityQuery matching, an entity with a disabled component will behave as if it does not have that component.

    IsComponentEnabled<T>(BufferTypeHandle<T>, int)

    Obsolete. Use IsComponentEnabled<T>(ref BufferTypeHandle<T>, int) instead.

    IsComponentEnabled<T>(ref BufferTypeHandle<T>, int)

    Checks whether a given IBufferElementData is enabled on the specified Entity. For the purposes of EntityQuery matching, an entity with a disabled component will behave as if it does not have that component.

    IsComponentEnabled<T>(ComponentTypeHandle<T>, int)

    Obsolete. Use IsComponentEnabled<T>(ref ComponentTypeHandle<T>, int) instead.

    IsComponentEnabled<T>(ref ComponentTypeHandle<T>, int)

    Checks whether a given IComponentData is enabled on the specified Entity. For the purposes of EntityQuery matching, an entity with a disabled component will behave as if it does not have that component.

    NumSharedComponents()

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

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

    Obsolete. Use SetChunkComponentData<T>(ref ComponentTypeHandle<T>, T) instead.

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

    Sets the value of a chunk component.

    SetComponentEnabled(ref DynamicComponentTypeHandle, int, bool)

    Enable or disable a IComponentData on the specified Entity. This operation does not cause a structural change, or affect the value of the component. For the purposes of EntityQuery matching, an entity with a disabled component will behave as if it does not have that component.

    SetComponentEnabled<T>(BufferTypeHandle<T>, int, bool)

    Obsolete. Use SetComponentEnabled<T>(ref BufferTypeHandle<T>, int, bool) instead.

    SetComponentEnabled<T>(ref BufferTypeHandle<T>, int, bool)

    Enable or disable a IBufferElementData on the specified Entity. This operation does not cause a structural change, or affect the value of the component. For the purposes of EntityQuery matching, an entity with a disabled component will behave as if it does not have that component.

    SetComponentEnabled<T>(ComponentTypeHandle<T>, int, bool)

    Obsolete. Use SetComponentEnabled<T>(ref ComponentTypeHandle<T>, int, bool) instead.

    SetComponentEnabled<T>(ref ComponentTypeHandle<T>, int, bool)

    Enable or disable a IComponentData on the specified Entity. This operation does not cause a structural change, or affect the value of the component. For the purposes of EntityQuery matching, an entity with a disabled component will behave as if it does not have that component.

    Operators

    Name Description
    operator ==(ArchetypeChunk, ArchetypeChunk)

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

    operator !=(ArchetypeChunk, ArchetypeChunk)

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


    Did you find this page useful? Please give it a rating:

    Thanks for rating this page!

    Report a problem on this page

    What kind of problem would you like to report?

    • This page needs code samples
    • Code samples do not work
    • Information is missing
    • Information is incorrect
    • Information is unclear or confusing
    • There is a spelling/grammar error on this page
    • Something else

    Thanks for letting us know! This page has been marked for review based on your feedback.

    If you have time, you can provide more information to help us fix the problem faster.

    Provide more information

    You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:

    You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:

    You've told us there is information missing from this page. Please tell us more about what's missing:

    You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:

    You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:

    You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:

    You've told us this page has a problem. Please tell us more about what's wrong:

    Thank you for helping to make the Unity documentation better!

    Your feedback has been submitted as a ticket for our documentation team to review.

    We are not able to reply to every ticket submitted.

    In This Article
    • Properties
    • Methods
    • Operators
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)