summaryrefslogtreecommitdiffstats
path: root/editor
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-08-28 00:11:53 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-08-28 00:11:53 +0200
commit9f70823eecdbbb5bee69f1fcd323122ead68defa (patch)
tree3a8c8fc2717ca4999ff786ce223d2c0284d8612c /editor
parent330fca1ffd0ba2fa7fc8ee270ab47fed645fd9b6 (diff)
parent56365183587a17999d52ea429ecdaa0fa9e623cf (diff)
downloadredot-engine-9f70823eecdbbb5bee69f1fcd323122ead68defa.tar.gz
Merge pull request #94012 from KoBeWi/reload_everything_to_update_one_line
Allow live reloading of built-in scripts
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/script_editor_plugin.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index b27e768999..7a052ebc19 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1079,8 +1079,12 @@ void ScriptEditor::_mark_built_in_scripts_as_saved(const String &p_parent_path)
}
Ref<Script> scr = edited_res;
- if (scr.is_valid() && scr->is_tool()) {
- scr->reload(true);
+ if (scr.is_valid()) {
+ trigger_live_script_reload(scr->get_path());
+
+ if (scr->is_tool()) {
+ scr->reload(true);
+ }
}
}
}