- Home /
Assigning Textures to Terrain at Runtime
I am making a game that makes use of procedurally generated terrain, and I need to know how to assign a texture to the newly made chunks of terrain at runtime. I know how to alter the SplatMap and AlphaMap and everything, but those do me no good if there are not yet any textures associated with the SplatMaps. So just to clarify, I am trying to define terrain textures at runtime. Is this possible? Or will I have to go back to using MeshRenderers?
Update: If anybody has an alternative method for quickly generating procedural meshes from a height map, I would also gladly accept that. I had a method using MeshObjects, but building the collider took far too long with the 65x65 heightmapped chunks.
Answer by Trey3Stone · Nov 05, 2013 at 04:59 PM
Figured it out. The answer is to use SplatPrototypes.
Answer by Aug749 · Jul 24, 2013 at 12:35 PM
you should be able to, check this post here. it should solve you problem depending on the type of way you want it handled.
Unfortunately, all that script does is swap Splat$$anonymous$$aps, it never actually changes the textures that the Splat$$anonymous$$aps are referencing.
Your answer
Follow this Question
Related Questions
Can't paint more than 8 textures on terrain 3 Answers
Paint textures like on terrain but without terrain? 0 Answers
Change texture on terrain based on Vector3 at runtime 0 Answers
cannot find terrain texture 0 Answers
Details texture casting shadows ? 0 Answers