How can i load FBX models on runtime?

Godot Version

4.3

Question

I have a script that loads gltf/glb models on runtime.

	var gltf_document_load = GLTFDocument.new()
	var gltf_state_load = GLTFState.new()
	var error = gltf_document_load.append_from_file(dir, gltf_state_load)
	if error == OK:
		var gltf_scene_root_node = gltf_document_load.generate_scene(gltf_state_load)
		origin.add_child(gltf_scene_root_node)
		_recursive_set_owner(gltf_scene_root_node,origin)
	else:
		print("Couldn't load glTF scene (error code: %s)." % error_string(error))

This script works fine, however, when i try the same thing using FBXDocument and FBXState, the model seems to doesn’t load in mid game. infact, this is what the console prints:

W 0:00:05:0476 data.gd:222 @ FinishLoad(): Adding ‘Room08’ as child to ‘Skeleton3D’ will make owner ‘’ inconsistent. Consider unsetting the owner beforehand.
<C++ Source> scene/main/node.cpp:1579 @ add_child()
data.gd:222 @ FinishLoad()

and nothing shows up in the game. Any ideas?

There are extended FBXDocument and FBXState resources that should have all the same gltf functions, have you tried using those instead of GLTFDocument and GLTFState?

yes… Infact, i stated i tried using these