# alphamapTextures

> Alpha map textures that store the splat weights of the terrain layers.

## Definition

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

```csharp
public Texture2D[] alphamapTextures { get; }
```

### Remarks

Each texture stores four layers, one per RGBA channel. The textures are separate Texture2D objects. Unity adds them to the TerrainData asset as sub-assets only if the TerrainData is already an asset when they are created, so save a new TerrainData as an asset before you assign terrain layers. To make a change to the weights from an Editor script undoable, for example with [TerrainData.SetAlphamaps](/engine/7000.0/script-reference/unityengine/terraindata/setalphamaps.md), register both the TerrainData and these textures with `Undo.RegisterCompleteObjectUndo` before the change. If you register only the TerrainData, undo does not restore the weights.
