diff options
author | Michael Alexsander <michaelalexsander@protonmail.com> | 2024-10-31 18:17:44 -0300 |
---|---|---|
committer | Michael Alexsander <michaelalexsander@protonmail.com> | 2024-11-05 10:51:20 -0300 |
commit | 81cb7658f85dfd382ceb5b3811c162445db068d3 (patch) | |
tree | 34ceddde99e8f4e482e0ca77a0c94e2dc69772e5 /editor/debugger/script_editor_debugger.cpp | |
parent | b00e1cbf743dcb6a2b7f6bd14e348a1a7cf3d403 (diff) | |
download | redot-engine-81cb7658f85dfd382ceb5b3811c162445db068d3.tar.gz |
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.cpp | 7 |
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); |