From ca4c63d654d3e31e8a7bfa7143b2d290de01c7e8 Mon Sep 17 00:00:00 2001 From: kobewi Date: Fri, 19 Nov 2021 17:45:16 +0100 Subject: Always soft-reload scripts --- editor/plugins/script_editor_plugin.cpp | 26 +++++++++++++++++--------- editor/plugins/script_editor_plugin.h | 1 - modules/gdscript/gdscript.cpp | 2 +- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index e87d31f018..3dbafff25b 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -962,7 +962,7 @@ void ScriptEditor::_reload_scripts() { ERR_CONTINUE(!rel_script.is_valid()); script->set_source_code(rel_script->get_source_code()); script->set_last_modified_time(rel_script->get_last_modified_time()); - script->reload(); + script->reload(true); } Ref text_file = edited_res; @@ -1366,9 +1366,17 @@ void ScriptEditor::_menu_option(int p_option) { } } break; - case FILE_TOOL_RELOAD: case FILE_TOOL_RELOAD_SOFT: { - current->reload(p_option == FILE_TOOL_RELOAD_SOFT); + Ref