# ToArchetypeChunkArray(AllocatorHandle)

> Synchronously creates an array of the chunks containing entities matching this EntityQuery.

## Definition

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

```csharp
public NativeArray<ArchetypeChunk> ToArchetypeChunkArray(AllocatorManager.AllocatorHandle allocator)
```

### Parameters

**** (\[AllocatorHandle]\(/engine/7000.0/script-reference/unity/collections/allocatormanager/allocatorhandle)): Allocator to use for the array.

### Returns

| Type                                                                                              | Description                                                    |
| ------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| [NativeArray\<ArchetypeChunk>](/engine/7000.0/script-reference/unity/collections/nativearray1.md) | A NativeArray of all the chunks in this matched by this query. |

### Remarks

This method blocks until the internal job that performs the query completes. If the query contains enableable components, chunks that contain zero entities with all relevant components enabled will not be included in the output list.
