Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

EditorSettings

继承: Resource < RefCounted < Object

保存编辑器设置的对象,这些设置与项目无关。

描述

保存编辑器设置的对象,这些设置与项目无关,通常在编辑器 > 编辑器设置菜单中可见。

属性名称中使用斜线分隔符来区分不同的部分。设置的值可以是任何 Variant 类型。编辑器设置的名称建议使用 snake_case 形式,与 Godot 编辑器本身保持一致。

可以使用以下方法访问设置,例如:

var settings = EditorInterface.get_editor_settings()
# 也可以写 `settings.set("some/property", 10)`,因为这个类内部覆盖了 `_set()`。
settings.set_setting("some/property", 10)
# 也可以写 `settings.get("some/property")` ,因为这个类内部覆盖了 `_get()`。
settings.get_setting("some/property")
var list_of_settings = settings.get_property_list()

注意:不能直接实例化这个类。请改用 EditorInterface.get_editor_settings 访问单例。

属性

bool

debugger/auto_switch_to_remote_scene_tree

int

debugger/profiler_frame_history_size

int

debugger/profiler_frame_max_functions

float

debugger/remote_inspect_refresh_interval

float

debugger/remote_scene_tree_refresh_interval

bool

docks/filesystem/always_show_folders

String

docks/filesystem/textfile_extensions

int

docks/filesystem/thumbnail_size

float

docks/property_editor/auto_refresh_interval

float

docks/property_editor/subresource_hue_tint

bool

docks/scene_tree/auto_expand_to_selected

bool

docks/scene_tree/start_create_dialog_fully_expanded

Color

editors/2d/bone_color1

Color

editors/2d/bone_color2

Color

editors/2d/bone_ik_color

Color

editors/2d/bone_outline_color

float

editors/2d/bone_outline_size

Color

editors/2d/bone_selected_color

float

editors/2d/bone_width

Color

editors/2d/grid_color

Color

editors/2d/guides_color

Color

editors/2d/smart_snapping_line_color

bool

editors/2d/use_integer_zoom_by_default

Color

editors/2d/viewport_border_color

float

editors/3d/default_fov

float

editors/3d/default_z_far

float

editors/3d/default_z_near

int

editors/3d/freelook/freelook_activation_modifier

float

editors/3d/freelook/freelook_base_speed

float

editors/3d/freelook/freelook_inertia

int

editors/3d/freelook/freelook_navigation_scheme

float

editors/3d/freelook/freelook_sensitivity

bool

editors/3d/freelook/freelook_speed_zoom_link

float

editors/3d/grid_division_level_bias

int

editors/3d/grid_division_level_max

int

editors/3d/grid_division_level_min

int

editors/3d/grid_size

bool

editors/3d/grid_xy_plane

bool

editors/3d/grid_xz_plane

bool

editors/3d/grid_yz_plane

bool

editors/3d/navigation/emulate_3_button_mouse

bool

editors/3d/navigation/emulate_numpad

bool

editors/3d/navigation/invert_x_axis

bool

editors/3d/navigation/invert_y_axis

int

editors/3d/navigation/navigation_scheme

int

editors/3d/navigation/orbit_modifier

int

editors/3d/navigation/pan_modifier

bool

editors/3d/navigation/warped_mouse_panning

int

editors/3d/navigation/zoom_modifier

int

editors/3d/navigation/zoom_style

float

editors/3d/navigation_feel/orbit_inertia

float

editors/3d/navigation_feel/orbit_sensitivity

float

editors/3d/navigation_feel/translation_inertia

float

editors/3d/navigation_feel/zoom_inertia

Color

editors/3d/primary_grid_color

int

editors/3d/primary_grid_steps

Color

editors/3d/secondary_grid_color

Color

editors/3d/selection_box_color

Color

editors/3d_gizmos/gizmo_colors/instantiated

Color

editors/3d_gizmos/gizmo_colors/joint

Color

editors/3d_gizmos/gizmo_colors/shape

bool

editors/animation/autorename_animation_tracks

bool

editors/animation/default_create_bezier_tracks

bool

editors/animation/default_create_reset_tracks

Color

editors/animation/onion_layers_future_color

Color

editors/animation/onion_layers_past_color

float

editors/grid_map/pick_distance

int

editors/panning/2d_editor_pan_speed

int

editors/panning/2d_editor_panning_scheme

int

editors/panning/animation_editors_panning_scheme

bool

editors/panning/simple_panning

int

editors/panning/sub_editors_panning_scheme

bool

editors/panning/warped_mouse_panning

int

editors/polygon_editor/point_grab_radius

bool

editors/polygon_editor/show_previous_outline

bool

editors/shader_editor/behavior/files/restore_shaders_on_load

bool

editors/tiles_editor/display_grid

Color

editors/tiles_editor/grid_color

float

editors/visual_editors/lines_curvature

float

editors/visual_editors/minimap_opacity

int

editors/visual_editors/visual_shader/port_preview_size

String

filesystem/directories/autoscan_project_path

String

filesystem/directories/default_project_path

String

filesystem/external_programs/3d_model_editor

String

filesystem/external_programs/audio_editor

String

filesystem/external_programs/raster_image_editor

String

filesystem/external_programs/vector_image_editor

int

filesystem/file_dialog/display_mode

bool

filesystem/file_dialog/show_hidden_files

int

filesystem/file_dialog/thumbnail_size

String

filesystem/import/blender/blender3_path

int

filesystem/import/blender/rpc_port

float

filesystem/import/blender/rpc_server_uptime

String

filesystem/import/fbx/fbx2gltf_path

bool

filesystem/on_save/compress_binary_resources

bool

filesystem/on_save/safe_save_on_backup_then_rename

String

filesystem/tools/oidn/oidn_denoise_path

int

interface/editor/accept_dialog_cancel_ok_buttons

bool

interface/editor/automatically_open_screenshots

String

interface/editor/code_font

int

interface/editor/code_font_contextual_ligatures

String

interface/editor/code_font_custom_opentype_features

String

interface/editor/code_font_custom_variations

int

interface/editor/code_font_size

float

interface/editor/custom_display_scale

bool

interface/editor/debug/enable_pseudolocalization

int

interface/editor/display_scale

String

interface/editor/editor_language

int

interface/editor/editor_screen

bool

interface/editor/expand_to_title

int

interface/editor/font_antialiasing

int

interface/editor/font_hinting

int

interface/editor/font_subpixel_positioning

float

interface/editor/low_processor_mode_sleep_usec

String

interface/editor/main_font

String

interface/editor/main_font_bold

int

interface/editor/main_font_size

bool

interface/editor/mouse_extra_buttons_navigate_history

int

interface/editor/project_manager_screen

bool

interface/editor/save_each_scene_on_quit

bool

interface/editor/separate_distraction_mode

int

interface/editor/show_internal_errors_in_toast_notifications

bool

interface/editor/single_window_mode

float

interface/editor/unfocused_low_processor_mode_sleep_usec

bool

interface/editor/use_embedded_menu

float

interface/inspector/float_drag_speed

int

interface/inspector/max_array_dictionary_items_per_page

bool

interface/inspector/show_low_level_opentype_features

bool

interface/multi_window/enable

bool

interface/multi_window/maximize_window

bool

interface/multi_window/restore_windows_on_load

int

interface/scene_tabs/display_close_button

int

interface/scene_tabs/maximum_width

bool

interface/scene_tabs/show_script_button

bool

interface/scene_tabs/show_thumbnail_on_hover

Color

interface/theme/accent_color

float

interface/theme/additional_spacing

Color

interface/theme/base_color

int

interface/theme/border_size

float

interface/theme/contrast

int

interface/theme/corner_radius

String

interface/theme/custom_theme

bool

interface/theme/draw_extra_borders

int

interface/theme/icon_and_font_color

float

interface/theme/icon_saturation

String

interface/theme/preset

float

interface/theme/relationship_line_opacity

bool

interface/touchscreen/enable_long_press_as_right_click

bool

interface/touchscreen/enable_pan_and_scale_gestures

bool

interface/touchscreen/increase_scrollbar_touch_area

float

interface/touchscreen/scale_gizmo_handles

String

network/debug/remote_host

int

network/debug/remote_port

String

network/http_proxy/host

int

network/http_proxy/port

String

network/tls/editor_tls_certificates

String

project_manager/default_renderer

int

project_manager/sorting_order

bool

run/auto_save/save_before_running

bool

run/output/always_clear_output_on_play

bool

run/output/always_close_output_on_stop

bool

run/output/always_open_output_on_play

int

run/output/font_size

int

run/window_placement/android_window

int

run/window_placement/rect

Vector2

run/window_placement/rect_custom_position

int

run/window_placement/screen

bool

text_editor/appearance/caret/caret_blink

float

text_editor/appearance/caret/caret_blink_interval

bool

text_editor/appearance/caret/highlight_all_occurrences

bool

text_editor/appearance/caret/highlight_current_line

int

text_editor/appearance/caret/type

int

text_editor/appearance/guidelines/line_length_guideline_hard_column

int

text_editor/appearance/guidelines/line_length_guideline_soft_column

bool

text_editor/appearance/guidelines/show_line_length_guidelines

bool

text_editor/appearance/gutters/highlight_type_safe_lines

bool

text_editor/appearance/gutters/line_numbers_zero_padded

bool

text_editor/appearance/gutters/show_info_gutter

bool

text_editor/appearance/gutters/show_line_numbers

int

text_editor/appearance/lines/autowrap_mode

bool

text_editor/appearance/lines/code_folding

int

text_editor/appearance/lines/word_wrap

int

text_editor/appearance/minimap/minimap_width

bool

text_editor/appearance/minimap/show_minimap

bool

text_editor/appearance/whitespace/draw_spaces

bool

text_editor/appearance/whitespace/draw_tabs

int

text_editor/appearance/whitespace/line_spacing

bool

text_editor/behavior/files/auto_reload_scripts_on_external_change

int

text_editor/behavior/files/autosave_interval_secs

bool

text_editor/behavior/files/convert_indent_on_save

bool

text_editor/behavior/files/restore_scripts_on_load

bool

text_editor/behavior/files/trim_trailing_whitespace_on_save

bool

text_editor/behavior/indent/auto_indent

int

text_editor/behavior/indent/size

int

text_editor/behavior/indent/type

bool

text_editor/behavior/navigation/drag_and_drop_selection

bool

text_editor/behavior/navigation/move_caret_on_right_click

bool

text_editor/behavior/navigation/scroll_past_end_of_file

bool

text_editor/behavior/navigation/smooth_scrolling

bool

text_editor/behavior/navigation/stay_in_script_editor_on_node_selected

int

text_editor/behavior/navigation/v_scroll_speed

bool

text_editor/completion/add_type_hints

bool

text_editor/completion/auto_brace_complete

float

text_editor/completion/code_complete_delay

bool

text_editor/completion/code_complete_enabled

bool

text_editor/completion/colorize_suggestions

bool

text_editor/completion/complete_file_paths

float

text_editor/completion/idle_parse_delay

bool

text_editor/completion/put_callhint_tooltip_below_current_line

bool

text_editor/completion/use_single_quotes

int

text_editor/help/class_reference_examples

int

text_editor/help/help_font_size

int

text_editor/help/help_source_font_size

int

text_editor/help/help_title_font_size

bool

text_editor/help/show_help_index

bool

text_editor/script_list/show_members_overview

bool

text_editor/script_list/sort_members_outline_alphabetically

String

text_editor/theme/color_theme

Color

text_editor/theme/highlighting/background_color

Color

text_editor/theme/highlighting/base_type_color

Color

text_editor/theme/highlighting/bookmark_color

Color

text_editor/theme/highlighting/brace_mismatch_color

Color

text_editor/theme/highlighting/breakpoint_color

Color

text_editor/theme/highlighting/caret_background_color

Color

text_editor/theme/highlighting/caret_color

Color

text_editor/theme/highlighting/code_folding_color

Color

text_editor/theme/highlighting/comment_color

Color

text_editor/theme/highlighting/completion_background_color

Color

text_editor/theme/highlighting/completion_existing_color

Color

text_editor/theme/highlighting/completion_font_color

Color

text_editor/theme/highlighting/completion_scroll_color

Color

text_editor/theme/highlighting/completion_scroll_hovered_color

Color

text_editor/theme/highlighting/completion_selected_color

Color

text_editor/theme/highlighting/control_flow_keyword_color

Color

text_editor/theme/highlighting/current_line_color

Color

text_editor/theme/highlighting/doc_comment_color

Color

text_editor/theme/highlighting/engine_type_color

Color

text_editor/theme/highlighting/executing_line_color

Color

text_editor/theme/highlighting/folded_code_region_color

Color

text_editor/theme/highlighting/function_color

Color

text_editor/theme/highlighting/keyword_color

Color

text_editor/theme/highlighting/line_length_guideline_color

Color

text_editor/theme/highlighting/line_number_color

Color

text_editor/theme/highlighting/mark_color

Color

text_editor/theme/highlighting/member_variable_color

Color

text_editor/theme/highlighting/number_color

Color

text_editor/theme/highlighting/safe_line_number_color

Color

text_editor/theme/highlighting/search_result_border_color

Color

text_editor/theme/highlighting/search_result_color

Color

text_editor/theme/highlighting/selection_color

Color

text_editor/theme/highlighting/string_color

Color

text_editor/theme/highlighting/symbol_color

Color

text_editor/theme/highlighting/text_color

Color

text_editor/theme/highlighting/text_selected_color

Color

text_editor/theme/highlighting/user_type_color

Color

text_editor/theme/highlighting/word_highlighted_color

方法

void

add_property_info ( Dictionary info )

bool

check_changed_settings_in_group ( String setting_prefix ) const

void

erase ( String property )

PackedStringArray

get_changed_settings ( ) const

PackedStringArray

get_favorites ( ) const

Variant

get_project_metadata ( String section, String key, Variant default=null ) const

PackedStringArray

get_recent_dirs ( ) const

Variant

get_setting ( String name ) const

bool

has_setting ( String name ) const

void

mark_setting_changed ( String setting )

void

set_builtin_action_override ( String name, InputEvent[] actions_list )

void

set_favorites ( PackedStringArray dirs )

void

set_initial_value ( StringName name, Variant value, bool update_current )

void

set_project_metadata ( String section, String key, Variant data )

void

set_recent_dirs ( PackedStringArray dirs )

void

set_setting ( String name, Variant value )


信号

settings_changed ( )

在编辑器设置改变后触发。


常量

NOTIFICATION_EDITOR_SETT