+1 vote

I'm trying to copy material from one MeshInstance to another. MeshInstance has materials inside of a .mesh and inside itself in Materials tab. I need to copy materials from Materials tab.
I've tried:

my_mesh_instance.get_surface_material(i)
my_mesh_instance.get_active_material(i)
my_mesh_instance.get("material/"+str(i)))
my_mesh_instance.mesh.surface_get_material(i)

All these methods return SURFACE material that is inside of a mesh. How do I get Material inside of a MeshInstance??

.

Godot version 3.3.3.stable
in Engine by (129 points)

1 Answer

0 votes
Best answer

nvm my mistake I was editing mesh vertices and removing surfaces

by (129 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.