summaryrefslogtreecommitdiffstats
path: root/editor/debugger/script_editor_debugger.cpp
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-11-10 12:12:27 -0600
committerThaddeus Crews <repiteo@outlook.com>2024-11-10 12:12:27 -0600
commita3efd2b49885efab50ed6e0d5cb58b4fcc235015 (patch)
tree60790c0df075b61abe6f4da90ff78266f69a8492 /editor/debugger/script_editor_debugger.cpp
parenteb1d4b2340e46d6fe944037b3a37ce6674c2b2bd (diff)
parent81cb7658f85dfd382ceb5b3811c162445db068d3 (diff)
downloadredot-engine-a3efd2b49885efab50ed6e0d5cb58b4fcc235015.tar.gz
Merge pull request #98710 from YeldhamDev/runtime_reimport_reload
Reload cached resources in runtime on file reimport
Diffstat (limited to 'editor/debugger/script_editor_debugger.cpp')
-rw-r--r--editor/debugger/script_editor_debugger.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp
index b78aad1721..c97272a571 100644
--- a/editor/debugger/script_editor_debugger.cpp
+++ b/editor/debugger/script_editor_debugger.cpp
@@ -1170,6 +1170,12 @@ String ScriptEditorDebugger::get_var_value(const String &p_var) const {
return inspector->get_stack_variable(p_var);
}
+void ScriptEditorDebugger::_resources_reimported(const PackedStringArray &p_resources) {
+ Array msg;
+ msg.push_back(p_resources);
+ _put_msg("scene:reload_cached_files", msg);
+}
+
int ScriptEditorDebugger::_get_node_path_cache(const NodePath &p_path) {
const int *r = node_path_cache.getptr(p_path);
if (r) {
@@ -1818,6 +1824,7 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
tabs->connect("tab_changed", callable_mp(this, &ScriptEditorDebugger::_tab_changed));
InspectorDock::get_inspector_singleton()->connect("object_id_selected", callable_mp(this, &ScriptEditorDebugger::_remote_object_selected));
+ EditorFileSystem::get_singleton()->connect("resources_reimported", callable_mp(this, &ScriptEditorDebugger::_resources_reimported));
{ //debugger
VBoxContainer *vbc = memnew(VBoxContainer);