diff options
-rw-r--r-- | doc/classes/EditorSettings.xml | 13 | ||||
-rw-r--r-- | editor/debugger/editor_debugger_node.cpp | 6 | ||||
-rw-r--r-- | editor/debugger/editor_profiler.cpp | 2 | ||||
-rw-r--r-- | editor/editor_settings.cpp | 6 |
4 files changed, 21 insertions, 6 deletions
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index bbe3ba4821..7e1bba202d 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -182,9 +182,22 @@ </method> </methods> <members> + <member name="debugger/auto_switch_to_remote_scene_tree" type="bool" setter="" getter=""> + 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. + </member> <member name="debugger/profiler_frame_history_size" type="int" setter="" getter=""> 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. </member> + <member name="debugger/profiler_frame_max_functions" type="int" setter="" getter=""> + 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. + </member> + <member name="debugger/remote_inspect_refresh_interval" type="float" setter="" getter=""> + 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. + </member> + <member name="debugger/remote_scene_tree_refresh_interval" type="float" setter="" getter=""> + 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. + </member> <member name="docks/filesystem/always_show_folders" type="bool" setter="" getter=""> 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 a368cacf56..0a6677e986 100644 --- a/editor/debugger/editor_debugger_node.cpp +++ b/editor/debugger/editor_debugger_node.cpp @@ -73,7 +73,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 @@ -84,8 +84,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"); EditorNode *editor = EditorNode::get_singleton(); editor->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 b0d6135d52..67b16d85d1 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 25c84e7447..8fc006347b 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -735,8 +735,12 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> 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", ""); |