Changed reload logic to auto-hard-reload scripts on save. It's simpler to use and also fixes #4756

This commit is contained in:
Juan Linietsky 2016-06-13 10:58:32 -03:00
parent 910151a361
commit 45443a1651
5 changed files with 29 additions and 4 deletions

View file

@ -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;
}