GetComponentDataPtrRO
Provides an unsafe read-only interface to components stored in this chunk.
Read time 1 minuteLast updated 2 days ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
GetComponentDataPtrRO<T>(ComponentTypeHandle<T>)
Provides an unsafe read-only interface to components stored in this chunk.
public readonly T* GetComponentDataPtrRO<T>(ref ComponentTypeHandle<T> typeHandle) where T : unmanaged, IComponentData
Parameters
An object containing type and job safety information. To create this object, call ComponentSystemBase.GetComponentTypeHandle. Pass the object to a job using a public field you define as part of the job struct.
Returns
Type | Description |
|---|---|
| <T>* | A pointer to the component data stored in the chunk. Returns null if the chunk's archetype does not include component type |
GetComponentDataPtrRO(DynamicComponentTypeHandle)
Provides an unsafe read-only interface to components stored in this chunk.
public readonly void* GetComponentDataPtrRO(ref DynamicComponentTypeHandle typeHandle)
Parameters
An object containing type and job safety information. To create this object, call ComponentSystemBase.GetDynamicComponentTypeHandle.
Returns
Type | Description |
|---|---|
| void* | A pointer to the component data stored in the chunk. Returns null if the chunk's archetype does not include the component type referenced by |