Godot Version
4.2.2
Question
I have a node in my scene, and I want to switch out its mesh for the first mesh in a glb loaded from the file system. Currently my code looks like this:
var gltf_state = GLTFState.new()
var gltf_doc = GLTFDocument.new()
gltf_doc.append_from_file(new_mesh_path, gltf_state)
var new_mesh : ImporterMesh = gltf_state.get_meshes()[0].mesh
self.mesh = new_mesh
Running it through the debugger it looks like the file is loading correctly and I can see that there is a mesh in the meshes array. To my understanding it seems like I can get the mesh into an ImporterMesh object which the docs say is analogous to ArrayMesh, however when I try to set the new mesh it doesn’t display.