diff options
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/text_file.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/resources/text_file.cpp b/scene/resources/text_file.cpp index 9b61a95edb..77ff0f55b1 100644 --- a/scene/resources/text_file.cpp +++ b/scene/resources/text_file.cpp @@ -67,5 +67,10 @@ Error TextFile::load_text(const String &p_path) { ERR_FAIL_COND_V_MSG(s.parse_utf8((const char *)w) != OK, ERR_INVALID_DATA, "Script '" + p_path + "' contains invalid unicode (UTF-8), so it was not loaded. Please ensure that scripts are saved in valid UTF-8 unicode."); text = s; path = p_path; +#ifdef TOOLS_ENABLED + if (ResourceLoader::get_timestamp_on_load()) { + set_last_modified_time(FileAccess::get_modified_time(path)); + } +#endif // TOOLS_ENABLED return OK; } |