Hi,
i´ve got a scene in which i colorize a material of an instantiated gameobject.
car = Instantiate(Resources.Load(carArray[carNumber], GameObject));
meshRenderer = car.GetComponentsInChildren(MeshRenderer);
If i´m searching for:
if(meshArray.renderer.material.name == "layerMat (Instance)")
It works fine on the whole model when the “Combine Children”-script isn´t active.
If i activate the “c.c.”-script, all the meshes are combined but the materialname won´t be found. Therefore nothing happend.
if(meshArray.renderer.material.name == "layerMat")
So how can i access the materials of combined meshes?