From 81cb7658f85dfd382ceb5b3811c162445db068d3 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Thu, 31 Oct 2024 18:17:44 -0300 Subject: Reload cached resources in runtime on file reimport --- editor/debugger/script_editor_debugger.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'editor/debugger/script_editor_debugger.cpp') 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); -- cgit v1.2.3 From 7cd850b90989d032a9b4942514252eb9f607c4e7 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Wed, 6 Nov 2024 16:47:36 +0100 Subject: [Debugger] Move quit shortcut configuration to the SceneDebugger --- editor/debugger/script_editor_debugger.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'editor/debugger/script_editor_debugger.cpp') diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp index b78aad1721..52fd3416fa 100644 --- a/editor/debugger/script_editor_debugger.cpp +++ b/editor/debugger/script_editor_debugger.cpp @@ -1033,6 +1033,9 @@ void ScriptEditorDebugger::start(Ref p_peer) { _update_buttons_state(); emit_signal(SNAME("started")); + Array quit_keys = DebuggerMarshalls::serialize_key_shortcut(ED_GET_SHORTCUT("editor/stop_running_project")); + _put_msg("scene:setup_scene", quit_keys); + if (EditorSettings::get_singleton()->get_project_metadata("debug_options", "autostart_profiler", false)) { profiler->set_profiling(true); } -- cgit v1.2.3