ToComponentDataArray<T>(AllocatorHandle)
Creates a NativeArray containing the components of type T for the selected entities.
Read time 1 minuteLast updated a day ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
public NativeArray<T> ToComponentDataArray<T>(AllocatorManager.AllocatorHandle allocator) where T : unmanaged, IComponentData
Parameters
The type of memory to allocate.
Returns
Type | Description |
|---|---|
| NativeArray<T> | An array containing the specified component for all the entities selected by the EntityQuery. |
Remarks
This version of the function blocks on all registered jobs against the relevant query components. For a non-blocking variant, see EntityQuery.ToComponentDataListAsync