diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-02 12:46:29 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-02 12:46:29 +0200 |
commit | 928441052b5aaabd09625da0173e2860e886a00e (patch) | |
tree | 7568bb6b65820eb833dc9deb3d2d50843bbf92fc | |
parent | 9122286553d9232143b63a0d5026e49555a284cd (diff) | |
parent | db763ae16ef18b81c229b1acc22e2131600ae419 (diff) | |
download | redot-engine-928441052b5aaabd09625da0173e2860e886a00e.tar.gz |
Merge pull request #90608 from raulsntos/editor/enable-plugin-after-adding
Enable `EditorPlugin` added by modules and GDExtensions
-rw-r--r-- | editor/editor_node.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 7ae566dd2c..5bb9aa91d2 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -3516,6 +3516,7 @@ void EditorNode::add_extension_editor_plugin(const StringName &p_class_name) { EditorPlugin *plugin = Object::cast_to<EditorPlugin>(ClassDB::instantiate(p_class_name)); singleton->editor_data.add_extension_editor_plugin(p_class_name, plugin); add_editor_plugin(plugin); + plugin->enable_plugin(); } void EditorNode::remove_extension_editor_plugin(const StringName &p_class_name) { @@ -7259,7 +7260,9 @@ EditorNode::EditorNode() { add_editor_plugin(memnew(AudioBusesEditorPlugin(audio_bus_editor))); for (int i = 0; i < EditorPlugins::get_plugin_count(); i++) { - add_editor_plugin(EditorPlugins::create(i)); + EditorPlugin *plugin = EditorPlugins::create(i); + add_editor_plugin(plugin); + plugin->enable_plugin(); } for (const StringName &extension_class_name : GDExtensionEditorPlugins::get_extension_classes()) { |