Paint terrain texture with scripting

Hey Guys!

I'm trying to find out if it is possible to paint textures to the terrain within runtime. For example if i place 2 buildings in my RTS i wan't that a path between the 2 is paintet. I'm thankful for any help, because i haven't found anything yet =)


Look in the TerrainData docs, particularly GetAlphaMaps and SetAlphaMaps.