diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index fbabdf9c816..4b1ff0b2aec 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -182,9 +182,22 @@ + + If [code]true[/code], automatically switches to the [b]Remote[/b] scene tree when running the project from the editor. If [code]false[/code], stays on the [b]Local[/b] scene tree when running the project from the editor. + The size of the profiler's frame history. The default value (3600) allows seeing up to 60 seconds of profiling if the project renders at a constant 60 FPS. Higher values allow viewing longer periods of profiling in the graphs, especially when the project is running at high framerates. + + The maximum number of script functions that can be displayed per frame in the profiler. If there are more script functions called in a given profiler frame, these functions will be discarded from the profiling results entirely. + [b]Note:[/b] This setting is only read when the profiler is first started, so changing it during profiling will have no effect. + + + The refresh interval for the remote inspector's properties (in seconds). Lower values are more reactive, but may cause stuttering while the project is running from the editor and the [b]Remote[/b] scene tree is selected in the Scene tree dock. + + + The refresh interval for the remote scene tree (in seconds). Lower values are more reactive, but may cause stuttering while the project is running from the editor and the [b]Remote[/b] scene tree is selected in the Scene tree dock. + If [code]true[/code], displays folders in the FileSystem dock's bottom pane when split mode is enabled. If [code]false[/code], only files will be displayed in the bottom pane. Split mode can be toggled by pressing the icon next to the [code]res://[/code] folder path. [b]Note:[/b] This setting has no effect when split mode is disabled (which is the default). diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp index 7083640b247..6143f5ac00c 100644 --- a/editor/debugger/editor_debugger_node.cpp +++ b/editor/debugger/editor_debugger_node.cpp @@ -74,7 +74,7 @@ EditorDebuggerNode::EditorDebuggerNode() { empty.instantiate(); tabs->add_theme_style_override("panel", empty); - auto_switch_remote_scene_tree = EDITOR_DEF("debugger/auto_switch_to_remote_scene_tree", false); + auto_switch_remote_scene_tree = EDITOR_GET("debugger/auto_switch_to_remote_scene_tree"); _add_debugger(); // Remote scene tree @@ -85,8 +85,8 @@ EditorDebuggerNode::EditorDebuggerNode() { SceneTreeDock::get_singleton()->add_remote_tree_editor(remote_scene_tree); SceneTreeDock::get_singleton()->connect("remote_tree_selected", callable_mp(this, &EditorDebuggerNode::request_remote_tree)); - remote_scene_tree_timeout = EDITOR_DEF("debugger/remote_scene_tree_refresh_interval", 1.0); - inspect_edited_object_timeout = EDITOR_DEF("debugger/remote_inspect_refresh_interval", 0.2); + remote_scene_tree_timeout = EDITOR_GET("debugger/remote_scene_tree_refresh_interval"); + inspect_edited_object_timeout = EDITOR_GET("debugger/remote_inspect_refresh_interval"); EditorRunBar::get_singleton()->get_pause_button()->connect("pressed", callable_mp(this, &EditorDebuggerNode::_paused)); } diff --git a/editor/debugger/editor_profiler.cpp b/editor/debugger/editor_profiler.cpp index c81518057a6..5e677c454ef 100644 --- a/editor/debugger/editor_profiler.cpp +++ b/editor/debugger/editor_profiler.cpp @@ -684,8 +684,6 @@ EditorProfiler::EditorProfiler() { int metric_size = CLAMP(int(EDITOR_GET("debugger/profiler_frame_history_size")), 60, 10000); frame_metrics.resize(metric_size); - EDITOR_DEF("debugger/profiler_frame_max_functions", 64); - frame_delay = memnew(Timer); frame_delay->set_wait_time(0.1); frame_delay->set_one_shot(true); diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 73168831326..8634b94858d 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -757,8 +757,12 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { // SSL EDITOR_SETTING_USAGE(Variant::STRING, PROPERTY_HINT_GLOBAL_FILE, "network/tls/editor_tls_certificates", _SYSTEM_CERTS_PATH, "*.crt,*.pem", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); - // Profiler + // Debugger/profiler + EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "debugger/auto_switch_to_remote_scene_tree", false, "") EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "debugger/profiler_frame_history_size", 3600, "60,10000,1") + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "debugger/profiler_frame_max_functions", 64, "16,512,1") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "debugger/remote_scene_tree_refresh_interval", 1.0, "0.1,10,0.01,or_greater") + EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "debugger/remote_inspect_refresh_interval", 0.2, "0.02,10,0.01,or_greater") // HTTP Proxy _initial_set("network/http_proxy/host", "");