From 213bd4199b22e109d432bc724f282cfbc17e60a7 Mon Sep 17 00:00:00 2001 From: Yuri Rubinsky Date: Mon, 12 Sep 2022 09:21:00 +0300 Subject: [PATCH] Fix last_modified_time on scripts --- modules/gdscript/gdscript.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 10babad37820..1cff2181af5d 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -1077,10 +1077,12 @@ Error GDScript::load_source_code(const String &p_path) { } source = s; + path = p_path; #ifdef TOOLS_ENABLED source_changed_cache = true; -#endif - path = p_path; + set_edited(false); + set_last_modified_time(FileAccess::get_modified_time(path)); +#endif // TOOLS_ENABLED return OK; }