- Home /
Help?! Changing Textures via mouse click
looking for answers whereby user click on a panel aka sample(Veneer texture), change texture, not material on a plane, but problem is that, i've got 12 panels in a gameobject(box001) & 4gameobjects in 1 gameobject (slot).. attached is screenshot.
i wanted to create 1 script only, but i do not know how to do
i saw a similar problem in thread, but it's in C#, dont understand at all.. unity forum thread
Answer by ina · Jan 23, 2011 at 09:23 AM
You probably want an array to keep track of all your panels. Then use the material class to assign a new texture (SetTexture) to it. This is all in one script - an empty gameobject, for example. It should also control the runtime instantiation of your panels.
If you are loading textures from the web or from hdd, you can use WWW.
Your answer
![](https://koobas.hobune.stream/wayback/20220613100605im_/https://answers.unity.com/themes/thub/images/avi.jpg)