Access terrain alphamaps directly? To clone them?

How do you clone a terrain’s alphamap? It’s inaccessible according to unity intellisense?

In case anyone reading this doesn’t understand: setalphamaps() changes all clones of the terrain. Not just the terrain you use it on.

The Solution: Clone the alpha map.

The Problem: Can’t access the alpha map’s Texture2D object.

Hence this question being here.

TerrainData.GetAlphamaps

SetAlphamaps will only be applied to the terrain you use it on, as long as the terrain is an instance.

You need to apply a new terrain data to the terrain(s) you want unique. modifying terraindata directly without “cloning” will update all terrain using that terrain data.

TerrainData newTerrainData = (TerrainData) Object.Instantiate(terData);

doing this in combination with erics answer will provide a solution