Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

ArchetypeChunk

struct in Unity.Entities

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

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

Static Properties

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

Properties

Property Description
Archetype The archetype of the entities stored in this chunk.
Capacity The number of entities that can fit in this chunk.
Count Returns the number of entities in the chunk.
Full Whether this chunk is exactly full.
SequenceNumber SequenceNumber is a unique number for each chunk, across all worlds.

Public Methods

Method Description
DidChange 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.
DidOrderChange Reports whether a structural change has occured in this chunk since the specified version.
Equals Two ArchetypeChunk instances are equal if they reference the same block of chunk memory.
GetBufferAccessor Provides access to a chunk's array of component values for a specific buffer component type.
GetBufferAccessorRO Provides read-only access to a chunk's array of component values for a specific buffer component type.
GetBufferAccessorRW Provides read/write access to a chunk's array of component values for a specific buffer component type.
GetChangeVersion Gets the change version number assigned to the specified type of component in this chunk.
GetChunkComponentData Gets the value of a chunk component.
GetChunkComponentDataRW Gets a reference to the value of a chunk component for read-write access.
GetComponentDataPtrRO Provides an unsafe read-only interface to components stored in this chunk.
GetComponentDataPtrRW Provides an unsafe read/write interface to components stored in this chunk.
GetDynamicComponentDataArrayReinterpret Construct a NativeArray view of a chunk's component data.
GetDynamicSharedComponentDataAddress Provides an unsafe interface to shared components stored in this chunk.
GetEnableableBits Gets a copy of all the Enableable bits for the specified type handle.
GetEnabledMask Provides a EnabledMask to the component enabled bits in this chunk.
GetEntityDataPtrRO Provides an unsafe read-only interface to array of Entities stored in this chunk.
GetHashCode Computes a hashcode to support hash-based collections.
GetNativeArray Provides a native array interface to entity instances stored in this chunk.
GetOrderVersion Gets the order version number assigned to this chunk.
GetRequiredComponentDataPtrRO Provides an unsafe read-only interface to components stored in this chunk. This variant assumes that the component is present in the chunk; use ArchetypeChunk.GetComponentDataPtrRO in cases where the caller can't guarantee this.
GetRequiredComponentDataPtrRW Provides an unsafe read/write interface to components stored in this chunk. This variant assumes that the component is present in the chunk; use ArchetypeChunk.GetComponentDataPtrRW in cases where the caller can't guarantee this.
GetSharedComponent Gets the current value of an unmanaged shared component.
GetSharedComponentDataBoxed Gets the current value of a shared component.
GetSharedComponentIndex Gets the index into the array of unique values for the specified shared component.
GetTransformAccessor Gets an accessor for the transforms of the entities in this chunk.
GetUntypedBufferAccessor Give unsafe access to the buffers with type chunkBufferTypeHandle in the chunk.
GetUntypedBufferAccessorReinterpret Construct a typed BufferAccessor view of a chunk's buffer component data from an untyped component handle.
Has Reports whether this chunk contains the specified component type.
HasChunkComponent Reports whether this chunk contains a chunk component of the specified component type.
Invalid Reports whether this ArchetypeChunk instance is invalid.
IsComponentEnabled 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 Sets the value of a chunk component.
SetComponentEnabled 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.
SetComponentEnabledForAll Enable or disable a IComponentData on all entities in this chunk.

Operators

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