summaryrefslogtreecommitdiff
path: root/tools/editor
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor')
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp5
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);
}