Combine materials out of renderer.materials

Hey,

If I have a mesh renderer with several materials in it. Then I can access those materials with renderer.materials.

So if I would no change it so that renderer.materials[1] = renderer.materials[2], then they would use the same material. So now I have twice the same material. So can I now combine them so that they are displayed as one material? so that I don’t need to change materials[1] and materials[2] each time but only one material. As far as I see it that would also improve performance as I have fewer materials that I use. But I couldn’t find any way to do that yet.

No, you can’t.

They are separate variables. You need to set them separately.

The only way to make them all change with one action is to change the settings of the Material itself.