Handling Terrain layers at runtime
Unity 2019.3.3f1
I'm making streaming terrain using basic Unity 3D terrain objects. So far, I am able to generate heightmaps and alphamaps, but whenever I create a new terrain object -- regardless of if that object is made using the "new neighbor" tool in the editor or at runtime by instantiating a prefab -- only one texture (alphamap index [0]) is available. This causes array overflows and other nonsense.
I can't find any documentation on how to copy all texturemaps from one terrain to another. I assume there has to be a way to do that, like:
newTerrain.arrayOfMyTextures = oldTerrain.arrayOfMyTextures;
or:
newTerrain.SetMyTextures(oldTerrain.GetMyTextures());
But I can't find anything like that at all. At this point I'd be fine with defining the textures in code, but I can't find a way to do that either -- only old documents about depreciated splatmaps.
Your answer
Follow this Question
Related Questions
Textures are differently lit on different terrains 0 Answers
3D space movement: character stuck at edge in free space 0 Answers
How do I enable/disable components in a prefab from another script? 1 Answer
How to make a texture that doesn't bleed to surrounding terrain,? 0 Answers
texturing multiple terrains 0 Answers