# ToComponentDataArrayAsync<T>(AllocatorHandle, out JobHandle)

> Obsolete. Use EntityQuery.ToComponentDataListAsync instead.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

## ToComponentDataArrayAsync\<T>(AllocatorHandle, JobHandle)

> **Warning:**
>
> **Deprecated.** This method does not correctly support enableable components, and is generally unsafe. Use ToComponentDataListAsync() instead. (RemovedAfter Entities 1.0)

```csharp
public NativeArray<T> ToComponentDataArrayAsync<T>(AllocatorManager.AllocatorHandle allocator, out JobHandle jobhandle) where T : unmanaged, IComponentData
```

### Parameters

**** (\[AllocatorHandle]\(/engine/7000.0/script-reference/unity/collections/allocatormanager/allocatorhandle)): The type of memory to allocate.**** (\[JobHandle]\(/engine/7000.0/script-reference/unity/jobs/jobhandle)): An `out` parameter assigned a handle that you can use as a dependency for a Job that uses the output data.

### Returns

| Type                                                                                 | Description                                                                                                                                                            |
| ------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [NativeArray\<T>](/engine/7000.0/script-reference/unity/collections/nativearray1.md) | An array containing all the values of component type `T` selected by the query. The contents of this array must not be accessed before `jobhandle` has been completed. |

### Remarks

**Obsolete.** Use [EntityQuery.ToComponentDataListAsync](/engine/7000.0/script-reference/unity/entities/entityquery/tocomponentdatalistasync.md) instead.

Creates (and asynchronously populates) a NativeArray containing the value of component `T` for the selected entities.
