You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
Better error message for malformed plugins
This commit is contained in:
@@ -2551,6 +2551,12 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//errors in the script cause the base_type to be ""
|
||||||
|
if (String(script->get_instance_base_type()) == "") {
|
||||||
|
show_warning(vformat(TTR("Unable to load addon script from path: '%s' There seems to be an error in the code, please check the syntax."), path));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//could check inheritance..
|
//could check inheritance..
|
||||||
if (String(script->get_instance_base_type()) != "EditorPlugin") {
|
if (String(script->get_instance_base_type()) != "EditorPlugin") {
|
||||||
show_warning(vformat(TTR("Unable to load addon script from path: '%s' Base type is not EditorPlugin."), path));
|
show_warning(vformat(TTR("Unable to load addon script from path: '%s' Base type is not EditorPlugin."), path));
|
||||||
|
|||||||
Reference in New Issue
Block a user