change material color for all object -Element object

hi
i use this code for change material color for one object and is OK.


GameObject.GetComponent().material.color = Color.red;


all materials for many objects are the same
and
i want change the color of material for all objects.
what code should i use?


tnx in advance.

renderer.sharedMaterial :slight_smile: