GetComponentDataPtrRO(Entity, ComponentType)
Gets a read-only pointer to a component of an entity.
Read time 1 minuteLast updated 3 days ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
public static void* GetComponentDataPtrRO(Entity entity, ComponentType type)
Parameters
Returns
Type | Description |
|---|---|
| void* | A pointer to the component's data, which must not be written to. |
Remarks
The data is TypeManager.TypeInfo.SizeInChunk bytes long. The pointer is invalid after the next structural change in the entity's world.