diff options
Diffstat (limited to 'core/script_language.cpp')
-rw-r--r-- | core/script_language.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/script_language.cpp b/core/script_language.cpp index b63aeb952c..d535c54dea 100644 --- a/core/script_language.cpp +++ b/core/script_language.cpp @@ -275,7 +275,13 @@ void ScriptServer::save_global_classes() { gcarr.push_back(d); } - ProjectSettings::get_singleton()->set("_global_script_classes", gcarr); + if (gcarr.empty()) { + if (ProjectSettings::get_singleton()->has_setting("_global_script_classes")) { + ProjectSettings::get_singleton()->clear("_global_script_classes"); + } + } else { + ProjectSettings::get_singleton()->set("_global_script_classes", gcarr); + } ProjectSettings::get_singleton()->save(); } |