change material color.

Is there another way to change materials color properties at runtime other than renderer.sharedMaterial.SetColor? I have an array of materials that are setup in the inspector and I would like to change them all together but there does’nt seem to be a way to unless they are attached to a mesh renderer component. Also renderer.sharedMaterial.SetColor only seems to adjust the first material in mesh renderer component and I want it to adjust everything attached to the renderer.

Iterate through the array with a for loop and change the renderer materials for all?

(may not be compilable, off the top of my head):

for (var i : int = 0; i < arrayName.length, i++){
arrayName[i] = /*renderer material color*/;
}