# TileArray

> Creates a new array and allocates enough memory to fit the provided number of elements.

## Definition

* **Type:** Constructor
* **Namespace:** [UnityEngine.Tilemaps](/engine/6000.7/script-reference/unityengine/tilemaps.md)
* **Assembly:** UnityEngine.TilemapModule

## TileArray(int, Allocator)

Creates a new array and allocates enough memory to fit the provided number of elements.

```csharp
public TileArray(int length, Allocator allocator)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of elements to allocate.**** (\[Allocator]\(/engine/6000.7/script-reference/unity/collections/allocator)): The [Allocator](/engine/6000.7/script-reference/unity/collections/allocator.md) to use for the data.

## TileArray(int, MemoryLabel)

Creates a new array and allocates enough memory to fit the provided number of elements, using the specified memory label.

```csharp
public TileArray(int length, MemoryLabel memoryLabel)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of elements to allocate.**** (\[MemoryLabel]\(/engine/6000.7/script-reference/unity/collections/memorylabel)): The [MemoryLabel](/engine/6000.7/script-reference/unity/collections/memorylabel.md) to allocate under.
