From 2ca4995a6f934b9d849679e3bbcf5722d5e238f0 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 3 Jun 2016 12:34:11 -0300 Subject: Cleaned up remote menu -Merged fileserver & deploy dumb clients option -Live Script Reloading can now happen automatically on script save -Changed Live to Mirror term to differentiate from Unity and Unreal, as what Godot does is not the same thing. --- tools/editor/plugins/script_editor_plugin.cpp | 21 +++++++++++++++++++++ tools/editor/plugins/script_editor_plugin.h | 6 ++++++ 2 files changed, 27 insertions(+) (limited to 'tools/editor/plugins') diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 2453ff3190..39b350eb4e 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -887,8 +887,19 @@ void ScriptEditor::_res_saved_callback(const Ref& p_res) { _update_script_names(); + + if (!pending_auto_reload && auto_reload_running_scripts) { + call_deferred("_live_auto_reload_running_scripts"); + pending_auto_reload=true; + } +} + +void ScriptEditor::_live_auto_reload_running_scripts() { + pending_auto_reload=false; + debugger->reload_scripts(); } + bool ScriptEditor::_test_script_times_on_disk() { @@ -2475,6 +2486,11 @@ void ScriptEditor::set_scene_root_script( Ref