# alphamapResolution

> The size of the alpha map in texels for either the width or the height.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/7000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.TerrainModule

```csharp
public int alphamapResolution { get; set; }
```

### Remarks

Setting this value, even to its current value, resizes the alpha map textures and resets all splat weights: the first terrain layer gets a weight of 1 everywhere and the other layers get 0. To keep existing painting, read the weights with [TerrainData.GetAlphamaps](/engine/7000.0/script-reference/unityengine/terraindata/getalphamaps.md) before you change the resolution, resample them to the new size, and write them back with [TerrainData.SetAlphamaps](/engine/7000.0/script-reference/unityengine/terraindata/setalphamaps.md). To make the change undoable from an Editor script, register both the TerrainData and its [TerrainData.alphamapTextures](/engine/7000.0/script-reference/unityengine/terraindata/alphamaptextures.md) with `Undo.RegisterCompleteObjectUndo` before you set this value.
