Browse Source

Postpone adding new extension plugins to the editor.

----

Extension EditorPlugins added during Hot Reload on Initialization level
Editor were being attached to the scene tree before all the GDExtension
Classes (such as already loaded resources) are re-initialized.
Yarvin 2 months ago
parent
commit
1aca96d139
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/extension/gdextension.cpp

+ 1 - 1
core/extension/gdextension.cpp

@@ -1086,7 +1086,7 @@ PackedStringArray GDExtension::get_classes_used() const {
 
 void GDExtensionEditorPlugins::add_extension_class(const StringName &p_class_name) {
 	if (editor_node_add_plugin) {
-		editor_node_add_plugin(p_class_name);
+		callable_mp_static(editor_node_add_plugin).call_deferred(p_class_name);
 	} else {
 		extension_classes.push_back(p_class_name);
 	}