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