- Home /
How to assign different TEXTURES to objects with the same mesh?
Hello, Internet!
I am making a game with a build mode similar to that of "The Sims" where I have one "Wall" object that is duplicated many times (seems to run fine). Anyway, like in "The Sims", I would like to be able to texture each instantiated wall object independently. Whenever you change just the texture, the material makes every object have the same texture. I have looked into the materials API, but I cannot figure out a good solution. How would you go about doing this?
Answer by AndreyL · Jun 11, 2014 at 05:56 PM
When you are changing the texture of the model, you are actually changing the material, that is shared between all of the models. To assign a different texture to your mesh, you should make another material, and assign it to the wall object.
This 5 minute tutorial from the Learn section explains this really well.
If you haven't already watched the tutorials in the Learn section, you really should. There are some really great short videos about general workflows in Wnity.
It really helped. I just needed to learn about material instances so that I can change individual copies. Thanks for the help!
Your answer
Follow this Question
Related Questions
Load Material to GameObject 2 Answers
How to dynamically add text to the texture of a 3d game object. 0 Answers
Dynamic Material & Textures 1 Answer
Select colour then change texture 0 Answers