diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-06-13 10:58:32 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-06-13 10:58:32 -0300 |
commit | 45443a165147859f83df37223572cdd40df476b4 (patch) | |
tree | e933745cff680030cc5e963651cd64440250475d /modules/gdscript/gd_script.cpp | |
parent | 910151a36153d954acaff9c95ef09ec6540179fa (diff) |
Changed reload logic to auto-hard-reload scripts on save. It's simpler to use and also fixes #4756
Diffstat (limited to 'modules/gdscript/gd_script.cpp')
-rw-r--r-- | modules/gdscript/gd_script.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index 359a9fe2d5..026fd04869 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -1898,6 +1898,11 @@ Error ResourceFormatSaverGDScript::save(const String &p_path,const RES& p_resour } file->close(); memdelete(file); + + if (ScriptServer::is_reload_scripts_on_save_enabled()) { + GDScriptLanguage::get_singleton()->reload_tool_script(p_resource,false); + } + return OK; } |