Change main color for two or more material

Hi,

I am trying to highlight my selected game object.
It works fine when i have a single material and then i do something like

object.rendere.material.SetColor("_Color",color);

But when i have two material for the one object , then selection works fine but color do not change .

30331-capture.png

Is there a work around for this , it do change color of the object in the inspector window , but visually no effect.

I was thinking if i could change the main color for both material at the same time , is it possible?

You also can use object.rendere.materials (with ā€˜sā€™ in the end) which return you array of materials on your mesh