Answer the question
In order to leave comments, you need to log in
How to replace material in Renderer.materials in Unity3d?
The Mesh Renderer has a materials component.
I need to replace Element 1 through a script.
Element 0 - The texture of the object
Element 1 - The texture of the cracks, which lies on the texture of the object.
Tried:
objectRenderer.materials[1] = newMaterial;
Does not work.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question