I have a car mesh with separate parts but with same material…
I’m trying to change color of all materials called “carMaterial” in all renderers in the child objects of the car object…
I have tried different approaches but with no luck…
CarBodyRenderers= GetComponentsInChildren<Renderer>();
foreach(Renderer rend in CarBodyRenderers){
foreach(Material matt in rend.materials){
if(matt.name == "carMaterial"){
etColor("_Color", carPaint);
}
}
}