[CLOSED][SOLVED]What kind of component is this?

I’m using a script that allows me to load an external .obj at runtime. That strange looking box in the attached image is an object I created to run some tests.
The script I’m using is able to load the .obj with multiple textures (if it has them), as shown in the image.
My question is, what type of component is each ‘material’ that is inside the red boxes I drew.
Are they multiple Mesh Renderes? A single one with multiple materials? Something else entirely?

Second question.
How can I change the one of the materials of the object, in script?


There’s a single mesh renderer component, as you can see in the inspector. You can access any one of the materials using renderer.materials, or better yet, renderer.sharedMaterials if you don’t want to create material instances.

1 Like

Works like a charm. Thank you

1 Like