how to address the sub-component

Hello guys,

I have this prefab in the resources, and I call the Resource.Load(name)… and then GameObject.Instantiate(…) to create my object in the scene. Now,

I need to retrieve the extensions of the mesh, as you can see in the picture, for example Room/Petrie the prefab as a sub-field called default. which contains the meshFilter.

How do I accesss a sub component of a GameObject?

Many thanks.
GC :slight_smile:

476423--16726--$example.JPG

Those aren’t sub-components, they’re child game objects, and they can be accessed (among other ways) using Transform.Find().

transform.Find(SubGameObjectName).GetComponent(name);