mirror of
https://github.com/tiennm99/godot.git
synced 2026-08-24 02:25:22 +00:00
Detect external modification of scenes
This commit is contained in:
@@ -584,6 +584,7 @@ Error ProjectSettings::_load_settings_text(const String &p_path) {
|
||||
// If we're loading a project.godot from source code, we can operate some
|
||||
// ProjectSettings conversions if need be.
|
||||
_convert_to_last_version(config_version);
|
||||
last_save_time = FileAccess::get_modified_time(get_resource_path().plus_file("project.godot"));
|
||||
return OK;
|
||||
} else if (err != OK) {
|
||||
ERR_PRINTS("Error parsing " + p_path + " at line " + itos(lines) + ": " + error_text + " File might be corrupted.");
|
||||
@@ -661,8 +662,11 @@ void ProjectSettings::clear(const String &p_name) {
|
||||
}
|
||||
|
||||
Error ProjectSettings::save() {
|
||||
|
||||
return save_custom(get_resource_path().plus_file("project.godot"));
|
||||
Error error = save_custom(get_resource_path().plus_file("project.godot"));
|
||||
if (error == OK) {
|
||||
last_save_time = FileAccess::get_modified_time(get_resource_path().plus_file("project.godot"));
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<String, List<String> > &props, const CustomMap &p_custom, const String &p_custom_features) {
|
||||
|
||||
Reference in New Issue
Block a user