i’m completely new to unity to need you people’s help.
I have a environment which has grassy texture for first level,which is perfect,Now i want to give Snow Area look & feel to my whole Environment using snow texture for second level and in third level,a desert look to my environment by using desert texture on environment.
difficulty i’m facing is the environment has hundred of gameobjects with Mesh Renderers.
it is almost impossible for me to access the hundred of meshrenderer and assign texture using script.
Can anybody give the simple and best solution for this scenario.
sounds like you want to keep the same level, but just change the materials ?
Depending on how complex your level is… there could be multiple solutions… post some screenshots ?
1.keep an array of materials… and more arrays of textures per level to swap into your materials with a script when you go to different levels. then just assign the appropriate textures in the level textures array, in a loop materials*.texture = desertTextures*
2. if your models use one big atlas texture… with only 1 material… then you only have to do the above once for one material.
OR if you have many models, with one material, create a script to find all renderers and all materials… then replace any known texture with the appropriate swap texture…
3. build a different scene per level, and load the other scene