From da55c06322b8cdab564331d56967a8d25d1072a0 Mon Sep 17 00:00:00 2001 From: kobewi Date: Wed, 8 Nov 2023 21:08:24 +0100 Subject: Save scene when saving built-in resource --- editor/plugins/script_editor_plugin.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'editor/plugins/script_editor_plugin.cpp') diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 5ba0f46734..6c4636dba3 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -2520,15 +2520,7 @@ void ScriptEditor::save_current_script() { clear_docs_from_script(scr); } - if (resource->is_built_in()) { - // If built-in script, save the scene instead. - const String scene_path = resource->get_path().get_slice("::", 0); - if (!scene_path.is_empty()) { - EditorNode::get_singleton()->save_scene_if_open(scene_path); - } - } else { - EditorNode::get_singleton()->save_resource(resource); - } + EditorNode::get_singleton()->save_resource(resource); if (scr.is_valid()) { update_docs_from_script(scr); -- cgit v1.2.3