Finding a child Mesh and Coloring it

Hello everybody, I’m new here and this is my first Unity project :slight_smile:

I have an entity(3d model), i am trying to change the color of on of its child meshes from inside the its own class.

Gameobject.Find doesnt find all the game objects in the game.

this works but for one game object only:
GameObject cc = GameObject.Find(“eye1”);
cc.renderer.material.color = Color.green;

eye1 being hte name of the object.
is there anyway i can reach that object from within the class itself?

thank you Very much.

Answering my own Question, i found something. I dont think its the best solution but it worked:

Renderer[ ] rs = GetComponentsInChildren();

foreach(Renderer r in rs)
{
if(r.tag == “RobotEye”)// this is the Tag i gave the model mesh
{
r.material.color = Color.red;
}
}
am still trying to figure out a component from an object though…

thank you.