GetComponentDataPtrRW(Entity, ComponentType)
Gets a read/write 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* GetComponentDataPtrRW(Entity entity, ComponentType type)
Parameters
Returns
Type | Description |
|---|---|
| void* | A pointer to the component's data. |
Remarks
The data is TypeManager.TypeInfo.SizeInChunk bytes long. The pointer is invalid after the next structural change in the entity's world. Getting it bumps the component's change version.