aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/plugins/script_editor_plugin.cpp
diff options
context:
space:
mode:
authorDana Olson2015-01-10 12:55:12 -0500
committerDana Olson2015-01-10 12:55:12 -0500
commit6c4e1650fb8b7e06c8657ca1a5de167184fda6c0 (patch)
tree5ac93a4b93469079337324f932793263ad6c3e73 /tools/editor/plugins/script_editor_plugin.cpp
parentf97582b5e9f069176a4c9226c39a880f786dae67 (diff)
downloadgodot-6c4e1650fb8b7e06c8657ca1a5de167184fda6c0.tar.gz
godot-6c4e1650fb8b7e06c8657ca1a5de167184fda6c0.tar.zst
godot-6c4e1650fb8b7e06c8657ca1a5de167184fda6c0.zip
add option to automatically reload changed scripts
Diffstat (limited to '')
-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 55957887d..20aeb05a5 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -630,7 +630,10 @@ bool ScriptEditor::_test_script_times_on_disk() {
if (!all_ok)
- disk_changed->call_deferred("popup_centered_ratio",0.5);
+ if (bool(EDITOR_DEF("text_editor/autoreload_changed_scripts",false)))
+ script_editor->_reload_scripts();
+ else
+ disk_changed->call_deferred("popup_centered_ratio",0.5);
return all_ok;
}