Good evening all,
I have an object that has multiple materials and was curious on how to make them change color through C#. The command that I found was reendererObject.material.SetColor(“Hat”, Color.red);. Is this the right code to do that? The first argument of SetColor says its an int nameID…not sure what exactly Im to put in the first argument there.
Id hoped it would have been the name of the material and then the color to change it to. It doesnt seem to do anything when calling that line of code for each corresponding part of the object I want to change color. I hope what Im saying make sense. Anyone know how to access each material of one object?