GetComponentData
Gets the value of a component for an entity.
Read time 1 minuteLast updated a day ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
GetComponentData<T>(Entity)
Gets the value of a component for an entity.
public T GetComponentData<T>(Entity entity) where T : unmanaged, IComponentData
Parameters
The entity.
Returns
Type | Description |
|---|---|
| T | A struct of type T containing the component value. |
GetComponentData<T>(SystemHandle)
Gets the value of a component for an entity associated with a system.
public T GetComponentData<T>(SystemHandle system) where T : unmanaged, IComponentData
Parameters
The system handle.
Returns
Type | Description |
|---|---|
| T | A struct of type T containing the component value. |