I have problems when trying to acces and change a single material inside an array of materials
var Mat ;
Mat = renderer.materials;
Mat [3].material=null;
i need to delete that material when a trigger requests it.
Where am i wrong?
or maybe just delete that array index all toghether?
I’m not sure why you would need to remove materials during gameplay. Can you give a bit more detail about what you are doing?
well, i have multiple materials in some objects acting as layers. beeing the last of them a “rust” layer. But since it is a transparent material i realize that i could just make it transparent all the way and that works same way.