|
@@ -1172,6 +1172,23 @@ void FileSystemDock::_update_project_settings_after_move(const Map<String, Strin
|
|
|
}
|
|
|
};
|
|
|
}
|
|
|
+
|
|
|
+ // Also search for the file in autoload, as they are stored differently from normal files.
|
|
|
+ List<PropertyInfo> property_list;
|
|
|
+ ProjectSettings::get_singleton()->get_property_list(&property_list);
|
|
|
+ for (const List<PropertyInfo>::Element *E = property_list.front(); E; E = E->next()) {
|
|
|
+ if (E->get().name.begins_with("autoload/")) {
|
|
|
+ // If the autoload resource paths has a leading "*", it indicates that it is a Singleton,
|
|
|
+ // so we have to handle both cases when updating.
|
|
|
+ String autoload = GLOBAL_GET(E->get().name);
|
|
|
+ String autoload_singleton = autoload.substr(1, autoload.length());
|
|
|
+ if (p_renames.has(autoload)) {
|
|
|
+ ProjectSettings::get_singleton()->set_setting(E->get().name, p_renames[autoload]);
|
|
|
+ } else if (autoload.begins_with("*") && p_renames.has(autoload_singleton)) {
|
|
|
+ ProjectSettings::get_singleton()->set_setting(E->get().name, "*" + p_renames[autoload_singleton]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
ProjectSettings::get_singleton()->save();
|
|
|
}
|
|
|
|