diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-12-04 23:12:24 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-12-04 23:12:24 +0100 |
commit | 3e7cc5ec32b9dc55a8f55300c0b3faf7b655448c (patch) | |
tree | b961a251132136584661a2f1374f4ae6937fd508 /editor/editor_node.cpp | |
parent | c7137673d3fbf19c98b7a801dd8866c2fc04d795 (diff) | |
parent | bc1949d7978c428ae3579e240368e20022ee77cd (diff) | |
download | redot-engine-3e7cc5ec32b9dc55a8f55300c0b3faf7b655448c.tar.gz |
Merge pull request #85271 from YuriSizov/core-check-please!
Correctly check scripts that must inherit `EditorPlugin`
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index b2a65063a7..535fb5f397 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -3459,13 +3459,13 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled, } // Plugin init scripts must inherit from EditorPlugin and be tools. - if (String(scr->get_instance_base_type()) != "EditorPlugin") { - show_warning(vformat(TTR("Unable to load addon script from path: '%s' Base type is not EditorPlugin."), script_path)); + if (!ClassDB::is_parent_class(scr->get_instance_base_type(), "EditorPlugin")) { + show_warning(vformat(TTR("Unable to load addon script from path: '%s'. Base type is not 'EditorPlugin'."), script_path)); return; } if (!scr->is_tool()) { - show_warning(vformat(TTR("Unable to load addon script from path: '%s' Script is not in tool mode."), script_path)); + show_warning(vformat(TTR("Unable to load addon script from path: '%s'. Script is not in tool mode."), script_path)); return; } } |