How can I do something like so:
renderer.materials.shader = Shader.Find(“Diffuse”)
I need to change the shader of all materials of multimaterialed objects, and am having minimal luck.
How can I do something like so:
renderer.materials.shader = Shader.Find(“Diffuse”)
I need to change the shader of all materials of multimaterialed objects, and am having minimal luck.
Try this:
for (m in renderer.materials)
m.shader = Shader.Find ("Diffuse");
I knew I wanted to do some kind of loop, but it wasn’t quite like that. Thanks again Daniel.