- Home /
Why do all my textures change to the same number of tiles?
Why is it that when I have a few game objects using the same texture, when I edit one of the objects, all of them change? For example, when I change the number of tiles on 1 object to 10, all the other objects (with the same texture) will change as well. Why does this happen and how do I stop it???
Answer by Owen-Reynolds · Jul 12, 2013 at 01:50 PM
That is intended. The only "fix" is to separately create Materials for each type of tiling you want (you can duplicate Materials through the edit button, to make it easier.)
Or, if you program the tiling, then renderer.material.mainTextureScale = new Vector2(10,10);
will work -- it auto-duplicates the Material first, so will change only for that one object. That's very non-obvious, but it does work that way.
The way to think of it is that Materials are Assets. So redSand tiled 3x3 is one thing. If you have some box, then everything in the Inspector is for that box, except the RedSand material. That's just a handy link to the real, shared Material.
wait, actually if i duplicate the texture won't that take up a lot of memory space?
You should duplicate the material, not the texture. Using separate materials won't increase your memory usage much, but it might increase your draw calls. All materials can use the same texture.
Your answer
Follow this Question
Related Questions
change variable and Texture2D 1 Answer
how do i change the wheel collider stiffness with a script? 1 Answer
When I install the program I need to change any settings? 0 Answers
Terrain Textures Shift (Summer/Winter) 2 Answers
List <> Problem :( 1 Answer