You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Don't save project settings when not necessary
This commit is contained in:
@@ -275,6 +275,14 @@ void ScriptServer::save_global_classes() {
|
||||
gcarr.push_back(d);
|
||||
}
|
||||
|
||||
Array old;
|
||||
if (ProjectSettings::get_singleton()->has_setting("_global_script_classes")) {
|
||||
old = ProjectSettings::get_singleton()->get("_global_script_classes");
|
||||
}
|
||||
if ((!old.is_empty() || gcarr.is_empty()) && gcarr.hash() == old.hash()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (gcarr.is_empty()) {
|
||||
if (ProjectSettings::get_singleton()->has_setting("_global_script_classes")) {
|
||||
ProjectSettings::get_singleton()->clear("_global_script_classes");
|
||||
|
||||
Reference in New Issue
Block a user