Hello, I want to ask if there is a way to change only one material in a gameobject. My gameobject’s renderer has 4 materials inside but I only want to access one material only so i can change its color. the material is named “10” inside element 2 (the yellow one). Please help me.
Yes. Get the renderer, get either the materials array or the sharedMaterials array. Change the materiel at index 2 and assign it back.
Access materials only if you need an individual change, use shared otherwise.