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 ArchetypeChunk.GetComponentDataPtrRO in cases where the caller can't guarantee this.
Read time 1 minuteLast updated a day ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
GetRequiredComponentDataPtrRO<T>(ComponentTypeHandle<T>)
public readonly void* GetRequiredComponentDataPtrRO<T>(ref ComponentTypeHandle<T> typeHandle)
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 |
|---|---|
| void* | A pointer to the component data stored in the chunk. Results are undefined if the chunk's archetype does not include component type |