diff --git a/core/script_language.cpp b/core/script_language.cpp index c088f3b99d8..f2822926e93 100644 --- a/core/script_language.cpp +++ b/core/script_language.cpp @@ -276,6 +276,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.empty() || gcarr.empty()) && gcarr.hash() == old.hash()) { + return; + } + if (gcarr.empty()) { if (ProjectSettings::get_singleton()->has_setting("_global_script_classes")) { ProjectSettings::get_singleton()->clear("_global_script_classes"); diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index d0e6236f8bd..1caeb982349 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -986,6 +986,14 @@ void EditorData::script_class_save_icon_paths() { d[E->get()] = _script_class_icon_paths[E->get()]; } + Dictionary old; + if (ProjectSettings::get_singleton()->has_setting("_global_script_class_icons")) { + old = ProjectSettings::get_singleton()->get("_global_script_class_icons"); + } + if ((!old.empty() || d.empty()) && d.hash() == old.hash()) { + return; + } + if (d.empty()) { if (ProjectSettings::get_singleton()->has_setting("_global_script_class_icons")) { ProjectSettings::get_singleton()->clear("_global_script_class_icons");