diff options
| author | Juan Linietsky | 2016-07-09 12:12:03 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-07-09 12:12:03 -0300 |
| commit | b0f0ae072367b061e4ff59b17b920f2d67b41e3a (patch) | |
| tree | 4b5af473b138bbbe48f5b4d777b393aa7216f157 /tools/editor/plugins/script_editor_plugin.cpp | |
| parent | 90f8a3bd29d9119fb4e34ec738df7583a41e7ea5 (diff) | |
| download | godot-b0f0ae072367b061e4ff59b17b920f2d67b41e3a.tar.gz godot-b0f0ae072367b061e4ff59b17b920f2d67b41e3a.tar.zst godot-b0f0ae072367b061e4ff59b17b920f2d67b41e3a.zip | |
Diffstat (limited to 'tools/editor/plugins/script_editor_plugin.cpp')
| -rw-r--r-- | tools/editor/plugins/script_editor_plugin.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index d7d495ff5..3b095d15f 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -874,6 +874,15 @@ void ScriptEditor::_reload_scripts(){ } + uint64_t last_date = script->get_last_modified_time(); + uint64_t date = FileAccess::get_modified_time(script->get_path()); + + //printf("last date: %lli vs date: %lli\n",last_date,date); + if (last_date==date) { + continue; + } + + Ref<Script> rel_script = ResourceLoader::load(script->get_path(),script->get_type(),true); ERR_CONTINUE(!rel_script.is_valid()); script->set_source_code( rel_script->get_source_code() ); |
