diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index eadfba21fc5..43c85cc6998 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -786,7 +786,10 @@ void ScriptEditor::_res_saved_callback(const Ref &p_res) { } _update_script_names(); + _trigger_live_script_reload(); +} +void ScriptEditor::_trigger_live_script_reload() { if (!pending_auto_reload && auto_reload_running_scripts) { call_deferred("_live_auto_reload_running_scripts"); pending_auto_reload = true; diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index dd772b68c00..cdfeb527d59 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -303,6 +303,7 @@ class ScriptEditor : public PanelContainer { bool pending_auto_reload; bool auto_reload_running_scripts; + void _trigger_live_script_reload(); void _live_auto_reload_running_scripts(); void _update_selected_editor_menu(); diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 21f87589494..626aa48b7ad 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -789,6 +789,8 @@ void ScriptEditor::_update_modified_scripts_for_external_editor(Ref