# GetTerrainAlphaMapChecked(Terrain, int)

> Returns the alphamap texture at mapIndex.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.TerrainTools](/engine/6000.7/script-reference/unityengine/terraintools.md)
* **Assembly:** UnityEngine.TerrainModule

```csharp
public static Texture2D GetTerrainAlphaMapChecked(Terrain terrain, int mapIndex)
```

### Parameters

**** (\[Terrain]\(/engine/6000.7/script-reference/unityengine/terrain)): Terrain tile.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index to retrieve.

### Returns

| Type                                                                  | Description                   |
| --------------------------------------------------------------------- | ----------------------------- |
| [Texture2D](/engine/6000.7/script-reference/unityengine/texture2d.md) | Alphamap texture at mapIndex. |

### Remarks

This function will throw an exception if the map index is out of range.
