Get SplatMap from Terrain...

I want to auto-magically assign the SplatMap from a given Terrain to other materials. Something like…

myMaterial.SetTexture("_SomeTexture", myTerrain.JustGiveMeTheSplatMapOk() );

To be extra clear, I don’t want one of the Splats. I want the RGBA mask for where they go.

This seems like it ought to be kind of obvious, but I can’t figure it out for the life of me. Help appreciated!

Good I posted so I could immediately find the answer.

For posterity its:

myTerrain.terrainData.alphaMapTextures[0]
1 Like