# Tilemap.SpriteArray

> A read-only array containing Sprite EntityId s.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine.Tilemaps](/engine/6000.7/script-reference/unityengine/tilemaps.md)
* **Assembly:** UnityEngine.TilemapModule
* **Implements:** [IEnumerable\<Sprite>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1), [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.ienumerable), [IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable)

```csharp
public struct Tilemap.SpriteArray : IEnumerable<Sprite>, IEnumerable, IDisposable
```

## Remarks

This can be accessed by index to return a [Sprite](/engine/6000.7/script-reference/unityengine/sprite.md).

## Properties

| Property                                                                                     | Description                                                                                                                                                                                    |
| -------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [this\[\]](/engine/6000.7/script-reference/unityengine/tilemaps/tilemap/spritearray/item.md) | Returns the [Sprite](/engine/6000.7/script-reference/unityengine/sprite.md) indexed in the [Tilemap.SpriteArray](/engine/6000.7/script-reference/unityengine/tilemaps/tilemap/spritearray.md). |
| [Length](/engine/6000.7/script-reference/unityengine/tilemaps/tilemap/spritearray/length.md) | The number of elements in the [Tilemap.SpriteArray](/engine/6000.7/script-reference/unityengine/tilemaps/tilemap/spritearray.md).                                                              |

## Methods

| Method                                                                                                     | Description                                                                                                                                                                       |
| ---------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Dispose](/engine/6000.7/script-reference/unityengine/tilemaps/tilemap/spritearray/dispose.md)             | Frees allocated memory for the [Tilemap.SpriteArray](/engine/6000.7/script-reference/unityengine/tilemaps/tilemap/spritearray.md).                                                |
| [GetEnumerator](/engine/6000.7/script-reference/unityengine/tilemaps/tilemap/spritearray/getenumerator.md) | Retrieves an iterator that allows you to iterate over all elements within the [Tilemap.SpriteArray](/engine/6000.7/script-reference/unityengine/tilemaps/tilemap/spritearray.md). |
