What is surface int?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By istemihan

from godot documents:

get_surface_material ( int surface ) const:

Returns the Material for a surface of the Mesh resource.

what is this surface int?

I only see this in meshInstance:

enter image description here

I tried 0 to 10 but I get below error:

enter image description here

I need to use this but could not understand how it works. I think this deserves abetter explanation.

It looks like your images didn’t load. Also you linked to an older version of the docs here is the one that matches your version, notice the 3.3 in the url. MeshInstance — Godot Engine (3.3) documentation in English

snowcapp | 2021-05-10 19:42

:bust_in_silhouette: Reply From: magicalogic

A mesh can have different surfaces so when requesting a surface you have to specify which surface by giving an index. Consider a mesh with different parts (like a car with a windshield, the body etc) which have different materials, each part could be its own surface with different materials.