GetChunkComponentData
Gets the value of a chunk component.
Read time 1 minuteLast updated a day ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
GetChunkComponentData<T>(ArchetypeChunk)
Gets the value of a chunk component.
public T GetChunkComponentData<T>(ArchetypeChunk chunk) where T : unmanaged, IComponentData
Parameters
The chunk.
Returns
Type | Description |
|---|---|
| T | A struct of type T containing the component value. |
Remarks
A chunk component is common to all entities in a chunk. You can access a chunk IComponentData instance through either the chunk itself or through an entity stored in that chunk.
GetChunkComponentData<T>(Entity)
Gets the value of chunk component for the chunk containing the specified entity.
public T GetChunkComponentData<T>(Entity entity) where T : unmanaged, IComponentData
Parameters
The entity.
Returns
Type | Description |
|---|---|
| T | A struct of type T containing the component value. |
Remarks
A chunk component is common to all entities in a chunk. You can access a chunk IComponentData instance through either the chunk itself or through an entity stored in that chunk.