diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-06-11 21:59:35 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-06-11 21:59:35 -0300 |
commit | 482b21a5a4562ac2dd4f5bb2c35b53f4d8b860c7 (patch) | |
tree | 15f53f29fbc904b70544d11ea6af9f5f062249e1 /tools/editor/plugins | |
parent | ceeb5453a8d8e385de49a5f72b1b395e7ca380e3 (diff) |
apply built-in scripts when running the game, closes #4987
Diffstat (limited to 'tools/editor/plugins')
-rw-r--r-- | tools/editor/plugins/script_editor_plugin.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 8d00f2cd8a..0735672214 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -2147,9 +2147,12 @@ void ScriptEditor::save_all_scripts() { continue; Ref<Script> script = ste->get_edited_script(); + if (script.is_valid()) + ste->apply_code(); + if (script->get_path()!="" && script->get_path().find("local://")==-1 &&script->get_path().find("::")==-1) { //external script, save it - ste->apply_code(); + editor->save_resource(script); //ResourceSaver::save(script->get_path(),script); } |