diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index ae6fa8e6bb..0bbe08821a 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1815,6 +1815,10 @@ Ref<TextFile> ScriptEditor::_load_text_file(const String &p_path, Error *r_error text_file->set_file_path(local_path); text_file->set_path(local_path, true); + if (ResourceLoader::get_timestamp_on_load()) { + text_file->set_last_modified_time(FileAccess::get_modified_time(path)); + } + if (r_error) { *r_error = OK; } @@ -1844,6 +1848,10 @@ Error ScriptEditor::_save_text_file(Ref<TextFile> p_text_file, const String &p_p file->close(); memdelete(file); + if (ResourceSaver::get_timestamp_on_save()) { + p_text_file->set_last_modified_time(FileAccess::get_modified_time(p_path)); + } + _res_saved_callback(sqscr); return OK; } |