Method GetChunkComponentData
GetChunkComponentData<T>(ref ComponentTypeHandle<T>)
Gets the value of a chunk component.
Declaration
public readonly T GetChunkComponentData<T>(ref ComponentTypeHandle<T> typeHandle) where T : struct
Parameters
Type | Name | Description |
---|---|---|
ComponentTypeHandle<T> | typeHandle | An object containing type and job safety information. To create this object, call GetComponentTypeHandle<T>(bool). Pass the object to a job using a public field you define as part of the job struct. |
Returns
Type | Description |
---|---|
T | A copy of the chunk component. |
Type Parameters
Name | Description |
---|---|
T | The data type of the chunk component. |
See Also
SetChunkComponentData<T>(ref ComponentTypeHandle<T>, T)
GetChunkComponentData<T>(ComponentTypeHandle<T>)
Obsolete. Use GetChunkComponentData<T>(ref ComponentTypeHandle<T>) instead.
Declaration
[Obsolete("The typeHandle argument should now be passed by ref. (RemovedAfter Entities 1.0)", false)]
public readonly T GetChunkComponentData<T>(ComponentTypeHandle<T> typeHandle) where T : struct
Parameters
Type | Name | Description |
---|---|---|
ComponentTypeHandle<T> | typeHandle | An object containing type and job safety information. To create this object, call GetComponentTypeHandle<T>(bool). Pass the object to a job using a public field you define as part of the job struct. |
Returns
Type | Description |
---|---|
T | A copy of the chunk component. |
Type Parameters
Name | Description |
---|---|
T | The data type of the chunk component. |