diff --git a/modules/gltf/register_types.cpp b/modules/gltf/register_types.cpp index 85da4a0dd74..dc995c92496 100644 --- a/modules/gltf/register_types.cpp +++ b/modules/gltf/register_types.cpp @@ -60,9 +60,10 @@ static void _editor_init() { void register_gltf_types() { #ifndef _3D_DISABLED #ifdef TOOLS_ENABLED - ClassDB::register_class(); ClassDB::APIType prev_api = ClassDB::get_current_api(); ClassDB::set_current_api(ClassDB::API_EDITOR); + ClassDB::register_class(); + ClassDB::register_class(); EditorPlugins::add_by_type(); ClassDB::set_current_api(prev_api); EditorNode::add_init_callback(_editor_init); @@ -75,7 +76,6 @@ void register_gltf_types() { ClassDB::register_class(); ClassDB::register_class(); ClassDB::register_class(); - ClassDB::register_class(); ClassDB::register_class(); ClassDB::register_class(); ClassDB::register_class();