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_SETTINGS_CHANGED = 10000

在编辑器设置改变后触发。它被各种编辑器插件使用,以在主题更改时更新视觉效果,或在配置更改时更新逻辑。


属性说明

bool debugger/auto_switch_to_remote_scene_tree

如果为 true,则在从编辑器运行项目时自动切换到远程场景树。如果为 false,则在从编辑器运行项目时保持本地场景树。


int debugger/profiler_frame_history_size

分析器的帧历史的大小。如果项目以恒定的 60 FPS 渲染,则默认值(3600)允许查看最多 60 秒的分析。更高的值允许在图表中查看更长时间的分析,尤其是当项目以高帧率运行时。


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

如果为 true,则在启用拆分模式时,在文件系统停靠面板的底部窗格中显示文件夹。如果为 false,则只有文件将显示在底部窗格中。可以通过按 res:// 文件夹路径旁边的图标来切换拆分模式。

注意:当拆分模式被禁用(这是默认设置)时,该设置无效。


String docks/filesystem/textfile_extensions

文件扩展名列表,“文件系统”面板会将这些文件认为是可编辑的文本文件(在文件上双击编辑)。


int docks/filesystem/thumbnail_size

“文件系统”面板中使用的缩略图大小(单位为像素)。另见 filesystem/file_dialog/thumbnail_size


float docks/property_editor/auto_refresh_interval

检查器停靠面板中属性的刷新间隔。当在 2D/3D 编辑器中调整小工具并同时查看检查器时,该设置的效果特别明显。值越低检查器刷新越频繁,也会占用更多 CPU 时间。


float docks/property_editor/subresource_hue_tint

检查器停靠面板中子资源背景的着色强度。着色用于区分检查器中不同的子资源。值越高,背景颜色差异越明显。


bool docks/scene_tree/auto_expand_to_selected

如果为 true,则在选中节点时,场景树停靠面板会自动展开该节点已折叠的父节点。


bool docks/scene_tree/start_create_dialog_fully_expanded

如果为 true,则创建对话框(创建新节点/创建新资源)将以展开其所有部分开始。否则,部分将被折叠,直到用户开始搜索(这将根据需要自动展开部分)。


Color editors/2d/bone_color1

2D 骨架编辑器中,骨骼颜色渐变的“开始”点。


Color editors/2d/bone_color2

2D 骨架编辑器中,骨骼颜色渐变的“结束”点。


Color editors/2d/bone_ik_color

2D 骨架编辑器中,用于启用了反向运动学的骨骼的颜色。


Color editors/2d/bone_outline_color

2D 骨架编辑器中,用于未选中骨骼的轮廓颜色。另见 editors/2d/bone_selected_color


float editors/2d/bone_outline_size

2D 骨架编辑器中轮廓的大小(单位为像素)。另见 editors/2d/bone_width

注意:对此值的更改只有在以任何方式修改 Bone2D 节点,或者关闭并重新打开场景后才会生效。


Color editors/2d/bone_selected_color

2D 骨架编辑器中,用于已选中骨骼的颜色。另见 editors/2d/bone_outline_color


float editors/2d/bone_width

2D 骨架编辑器中的骨骼宽度(单位为像素)。另见 editors/2d/bone_outline_size

注意:对此值的更改只有在以任何方式修改 Bone2D 节点,或者关闭并重新打开场景后才会生效。


Color editors/2d/grid_color

2D 编辑器使用的栅格颜色。


Color editors/2d/guides_color

2D 编辑器使用的参考线颜色。可以通过从标尺上拖动鼠标光标来创建参考线。


Color editors/2d/smart_snapping_line_color

在 2D 编辑器中,绘制智能吸附线时使用的颜色。如果在 2D 编辑器视口顶部的“吸附选项”菜单中启用智能吸附,则移动 2D 节点时智能吸附线将自动显示。


bool editors/2d/use_integer_zoom_by_default

如果为 true,2D 编辑器将在不按住 Alt 键的情况下吸附到整数缩放值,并在按住时吸附到 2 的幂。如果为 false,则交换这种行为。


Color editors/2d/viewport_border_color

2D 编辑器中视口边框的颜色。该边框表示在项目设置中定义的基本分辨率下的视口大小。除非使用 Camera2D 节点,或者除非调整窗口大小并将拉伸模式设置为 disabled,否则放置在该边界之外的对象将不可见。


float editors/3d/default_fov

在 3D 编辑器中使用的默认相机视野(以度为单位)。可以使用 3D 编辑器顶部的查看菜单,在每个场景的基础上调整相机视野。如果使用查看菜单调整了场景的相机视野,则该设置将在相关场景中被忽略。在编辑器中预览 Camera3D 节点时,该设置也将被忽略。


float editors/3d/default_z_far

在 3D 编辑器中使用的默认相机远剪辑距离(以度为单位)。较高的值可以查看距离相机较远的对象,但会降低深度缓冲区的精度(这可能导致远处可见的 Z 冲突)。可以使用 3D 编辑器顶部的查看菜单在每个场景的基上,调整相机远剪辑距离。如果一个场景使用查看菜单调整了其相机远剪辑距离,则该设置在相关场景中将被忽略。在编辑器中预览 Camera3D 节点时,该设置也将被忽略。


float editors/3d/default_z_near

要在 3D 编辑器中使用的默认相机近剪辑距离(以度为单位)。较低的值可以查看距离相机更近的对象,但会降低深度缓冲区的精度(这可能会导致远处可见的 Z 冲突)。可以使用 3D 编辑器顶部的查看菜单,在每个场景的基上调整相机近剪辑距离。如果一个场景使用查看菜单,调整了其相机近剪辑距离,则该设置在相关场景中将被忽略。在编辑器中预览 Camera3D 节点时,该设置也将被忽略。


int editors/3d/freelook/freelook_activation_modifier

用于在 3D 编辑器中启用自由观看的修饰键(在按下鼠标右键的同时)。

注意:无论该设置如何,自由观看切换键盘快捷键(默认为 Shift + F)始终可用。

注意:在 Linux 的某些窗口管理器上,Alt 键在同时单击鼠标按钮时会被窗口管理器拦截。这意味着 Godot 不会看到该修饰键被按下。


float editors/3d/freelook/freelook_base_speed

基本 3D 自由观看速度(单位:3D 单位(unit)每秒)。这可以通过在自由观看模式下使用鼠标滚轮进行调整,或者按住“快速”或“慢速”修饰键(默认分别为 ShiftAlt )。


float editors/3d/freelook/freelook_inertia

3D 自由观看相机的惯性。较高的值会使相机启动和停止更慢,这看起来更流畅但会增加延迟。


int editors/3d/freelook/freelook_navigation_scheme

在 3D 编辑器中启用自由观看时使用的导航方案。在 3D 编辑器中设计特定关卡时,下面的一些导航方案可能会更方便。

  • 默认值:“自由观看向前”、“自由观看向后”、“自由观看向上”和“自由观看向下”键将相对于相机移动,运动时考虑相机的俯仰角。

  • 部分轴锁定:“自由观看向前”和“自由观看向后”键将相对于相机移动,运动时考虑相机的俯仰角。“自由观看向上”和“自由观看向下”键将以“绝对的”方式移动,运动时考虑相机的俯仰角。

  • 完全轴锁定:“自由观看向前”、“自由观看向后”、“自由观看向上”和“自由观看向下”键将以“绝对的”方式移动,运动时考虑相机的俯仰角。

另见 editors/3d/navigation/navigation_scheme


float editors/3d/freelook/freelook_sensitivity

在 3D 编辑器中启用自由观看模式时使用的鼠标灵敏度。另见 editors/3d/navigation_feel/orbit_sensitivity


如果为 true,则自由观看速度与 3D 编辑器中相机轨道模式中使用的缩放值相关联。


float editors/3d/grid_division_level_bias

在 3D 编辑器中使用的栅格划分偏差。负值会使小的栅格划分出现得更早,而正值会使小的栅格划分出现得更晚。


int editors/3d/grid_division_level_max

在 3D 编辑器中使用的最大栅格划分。这个属性与 editors/3d/primary_grid_steps 一同决定栅格划分的大小。栅格不能大于 primary_grid_steps ^ grid_division_level_max 个单位。默认情况下 editors/3d/primary_grid_steps8,这意味着无论相机离栅格有多远,每个栅格划分都不能大于 64 个单位(因此主栅格线之间相距 512 个单位)。


int editors/3d/grid_division_level_min

在 3D 编辑器中使用的最小栅格划分。这个属性与 editors/3d/primary_grid_steps 一同决定栅格划分的大小。栅格不能小于 primary_grid_steps ^ grid_division_level_min 个单位。默认情况下这意味着无论相机离栅格有多近,每个栅格划分都不能小于 1 个单位。


int editors/3d/grid_size

栅格大小,单位:3D 单位(unit)。较高的值可防止栅格在某些角度出现“截断”,但会使栅格对渲染的要求更高。根据相机的位置,栅格可能不会完全可见,因为着色器用于逐渐淡化它。


bool editors/3d/grid_xy_plane

如果为 true,则在 XY 平面上渲染栅格。可用于 3D 横向卷轴游戏。


bool editors/3d/grid_xz_plane

如果为 true,则在 XZ 平面上渲染栅格。


bool editors/3d/grid_yz_plane

如果为 true,则在 YZ 平面上渲染栅格。可用于 3D 横向卷轴游戏。


bool editors/3d/navigation/emulate_3_button_mouse

如果为 true,启用 3 键鼠标模拟模式。这在使用触控板的笔记本电脑上很有用。

启用 3 键鼠标模拟模式后,即使未按住任何鼠标按钮,也始终可以在 3D 编辑器视口中使用平移、缩放、和视轨修饰键。

注意:无论 editors/3d/navigation/orbit_modifier 中配置的视轨修饰键如何,Alt 在该模式下始终可用于视轨,以提高绘图板的可用性。


bool editors/3d/navigation/emulate_numpad

如果为 true,则允许使用顶行 0-9 键作为 3D 编辑器导航的等效数字键盘键。应该在没有可用数字小键盘的键盘上启用。


bool editors/3d/navigation/invert_x_axis

如果为 true,则在 3D 编辑器中平移或视轨时,反转鼠标水平轴。该设置适用于自由观看模式。


bool editors/3d/navigation/invert_y_axis

如果为 true,则在 3D 编辑器中平移、视轨、或使用自由观看模式时,反转鼠标垂直轴。


int editors/3d/navigation/navigation_scheme

在 3D 编辑器中使用的导航方案。更改该设置将影响鼠标按钮,这些鼠标按钮必须被按住才能在 3D 编辑器视口中执行某些操作。

  • Godot鼠标中键进行视轨,Shift + 鼠标中键进行平移。鼠标滚轮进行缩放。

  • Maya:Alt + 鼠标左键进行视轨。鼠标中键进行平移,Shift + 鼠标中键 平移速度提高 10 倍。鼠标滚轮进行缩放。

  • Modo:Alt + 鼠标左键进行视轨。 Alt + Shift + 鼠标左键进行平移。 Ctrl + Alt + 鼠标左键进行缩放。

另请参阅 editors/3d/freelook/freelook_navigation_scheme

注意:在 Linux 的某些窗口管理器上,Alt 键在同时点击鼠标按钮时会被窗口管理器拦截。这意味着 Godot 不会看到该修饰键被按下。


int editors/3d/navigation/orbit_modifier

必须被按住以在 3D 编辑器中进行视轨的修饰键。

注意:如果 editors/3d/navigation/emulate_3_button_mousetrue,则 Alt 将始终可用于视轨以提高绘图板的可用性。

注意:在 Linux 的某些窗口管理器上,Alt 键在同时点击鼠标按钮时会被窗口管理器拦截。这意味着 Godot 不会看到该修饰键被按下。


int editors/3d/navigation/pan_modifier

必须被按住以在 3D 编辑器中进行平移的修饰键。

注意:在 Linux 的某些窗口管理器上,Alt 键在同时点击鼠标按钮时会被窗口管理器拦截。这意味着 Godot 不会看到该修饰键被按下。


bool editors/3d/navigation/warped_mouse_panning

如果为 true,则会在 3D 编辑器中平移时,鼠标超出 3D 视口范围后将其传送到对侧。这样在大型区域中平移就不必先退出平移然后调整鼠标光标。


int editors/3d/navigation/zoom_modifier

必须被按住以在 3D 编辑器中进行放大的修饰键。

注意:在 Linux 的某些窗口管理器上,Alt 键在同时点击鼠标按钮时会被窗口管理器拦截。这意味着 Godot 不会看到该修改键被按下。


int editors/3d/navigation/zoom_style

当通过移动鼠标进行缩放时要使用的鼠标光标移动方向。这不会影响使用鼠标滚轮进行缩放。


float editors/3d/navigation_feel/orbit_inertia

在 3D 编辑器中进行视轨时要使用的惯性。更高的值会使相机启动和停止更慢,这看起来更流畅但会增加延迟。


float editors/3d/navigation_feel/orbit_sensitivity

在 3D 编辑器中进行视轨时要使用的鼠标灵敏度。另请参阅 editors/3d/freelook/freelook_sensitivity


float editors/3d/navigation_feel/translation_inertia

在 3D 编辑器中进行平移时要使用的惯性。更高的值会使相机启动和停止更慢,这看起来更流畅但会增加延迟。


float editors/3d/navigation_feel/zoom_inertia

在 3D 编辑器中进行缩放时要使用的惯性。更高的值会使相机启动和停止更慢,这看起来更流畅但会增加延迟。


Color editors/3d/primary_grid_color

用于主要 3D 栅格的颜色。颜色的 Alpha 通道会影响栅格的不透明度。


int editors/3d/primary_grid_steps

如果被设置为大于 0 的值,则主栅格线应在其中被绘制。默认情况下,主栅格线被配置的比次要栅格线更显眼。这有助于在 3D 编辑器中进行测量。另请参阅 editors/3d/primary_grid_coloreditors/3d/secondary_grid_color


Color editors/3d/secondary_grid_color

用于次要 3D 栅格的颜色。这通常是没有 editors/3d/primary_grid_color 显眼的颜色。颜色的 Alpha 通道影响栅格的不透明度。


Color editors/3d/selection_box_color

用于在 3D 编辑器视口中围绕选定节点的选择框的颜色。颜色的 Alpha 通道影响选择框的不透明度。


Color editors/3d_gizmos/gizmo_colors/instantiated

用于 3D 编辑器小工具的颜色覆盖,适用于相关的 Node3D(从当前场景的角度看)属于实例化场景文件的情况。


Color editors/3d_gizmos/gizmo_colors/joint

用于 Joint3DPhysicalBone3D 的 3D 编辑器小工具颜色。


Color editors/3d_gizmos/gizmo_colors/shape

用于 CollisionShape3DVehicleWheel3DRayCast3DSpringArm3D 的 3D 编辑器小工具颜色。


bool editors/animation/autorename_animation_tracks

如果为 true,则在“场景”面板中重命名节点或重设节点的父节点时,会自动更新动画轨道的目标路径。


bool editors/animation/default_create_bezier_tracks

如果为 true,则在按下属性旁的“钥匙”图标向动画中添加新轨道时,创建贝塞尔轨道而不是标准轨道。贝塞尔轨道可以更精细地控制动画曲线,但调整的难度也会大一些。


bool editors/animation/default_create_reset_tracks

如果为 true,则会在新建动画轨道时创建 RESET 轨道。这个轨道会用于将动画恢复到“默认”状态。


Color editors/animation/onion_layers_future_color

调制颜色,用于在动画编辑器的洋葱皮功能中显示“未来”帧。


Color editors/animation/onion_layers_past_color

调制颜色,用于在动画编辑器的洋葱皮功能中显示“过去”帧。


float editors/grid_map/pick_distance

可以在 GridMap 上放置图块的最大距离,相对于相机位置(使用 3D 单位)。


int editors/panning/2d_editor_pan_speed

在 2D 编辑器中使用鼠标滚轮或触摸屏事件进行平移的速度。该设置不适用于通过按住鼠标中键或鼠标右键进行的平移。


int editors/panning/2d_editor_panning_scheme

控制在 2D 编辑器中滚动鼠标滚轮是缩放还是平移。另请参阅 editors/panning/sub_editors_panning_schemeeditors/panning/animation_editors_panning_scheme


int editors/panning/animation_editors_panning_scheme

控制在动画轨道编辑器和贝塞尔编辑器中滚动鼠标滚轮是缩放还是平移。另请参阅 editors/panning/2d_editor_panning_schemeeditors/panning/sub_editors_panning_scheme(控制的是动画混合树编辑器中的平移行为)。


bool editors/panning/simple_panning

如果为 true,允许通过在 2D 编辑器视口中,按住 Space 进行平移(除了使用鼠标中键或鼠标右键进行平移)。如果为 false,则必须在按住 Space 的同时,按住鼠标左键才能在 2D 编辑器视口中进行平移。


int editors/panning/sub_editors_panning_scheme

控制鼠标滚轮滚动在子编辑器中是缩放还是平移。受影响的子编辑器列表有:动画混合树编辑器、Polygon2D 编辑器、图块集编辑器、纹理区域编辑器、和可视着色器编辑器。另请参阅 editors/panning/2d_editor_panning_schemeeditors/panning/animation_editors_panning_scheme


bool editors/panning/warped_mouse_panning

如果为 true,则会在 2D 编辑器中平移时,鼠标超出 2D 视口范围后将其传送到对侧。这样在大型区域中平移就不必先退出平移然后调整鼠标光标。


int editors/polygon_editor/point_grab_radius

Polygon2DCollisionPolygon2D 编辑器中,点可以被选择的半径(以像素为单位)。更高的值可以更轻松地快速地选择点,但是当多个点彼此靠近时,可能会使选择想要的点变得更加困难。


bool editors/polygon_editor/show_previous_outline

如果为 true,则在 2D 多边形编辑器中,以不透明的灰色轮廓,显示多边形先前的形状。拖动一个点直到释放鼠标左键前,会显示该轮廓。


bool editors/shader_editor/behavior/files/restore_shaders_on_load

如果为 true,则会重新打开项目上一次关闭时着色器编辑器中打开的着色器文件。


bool editors/tiles_editor/display_grid

如果为 true,则在 TileMap 编辑器处于活动状态时显示一个栅格。另请参阅 editors/tiles_editor/grid_color


Color editors/tiles_editor/grid_color

用于 TileMap 编辑器栅格的颜色。

注意:仅当 editors/tiles_editor/display_gridtrue 时有效。


float editors/visual_editors/lines_curvature

用于可视着色器编辑器中连接线的曲率。更高的值会使连接线看起来更弯曲,值高于 0.5 会导致连接线中间出现更多“角度”转折。


float editors/visual_editors/minimap_opacity

在可视着色器编辑器的右下角显示的小地图的不透明度。


int editors/visual_editors/visual_shader/port_preview_size

在可视着色器 uniform 中用于端口预览的大小(通过点击输出旁边的“眼睛”图标进行切换)。该值以像素为单位且以 100% 缩放时的值定义,并将随缩放自动缩放。


String filesystem/directories/autoscan_project_path

项目应该被(递归地)扫描的文件夹,其方式类似于项目经理的扫描按钮。为方便起见,可以将其设置为与 filesystem/directories/default_project_path 相同的值。

注意:将该路径设置为一个包含大量文件/文件夹的文件夹,会显著减慢项目管理器的启动速度。为了让项目管理器快速启动,建议将该值设置为一个尽可能“具体”的文件夹。


String filesystem/directories/default_project_path

点击项目管理器的新建项目按钮时,默认应在其中创建新项目的文件夹。为方便起见,可以将其设置为与 filesystem/directories/autoscan_project_path 相同的值。


String filesystem/external_programs/3d_model_editor

点击文件系统面板中的“在外部程序中打开”选项时,用于打开 3D 模型场景文件的程序。如果未指定,则该文件会使用系统默认的程序打开。


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

编辑器的文件对话框所使用的显示模式。

  • Thumbnails(缩略图)占据更多空间,但可以显示动态资源缩略图,无需打开也能够方便地预览资源。

  • List(列表)更紧凑,但不显示动态资源缩略图,而是根据文件扩展名显示静态图标。


bool filesystem/file_dialog/show_hidden_files

如果为 true,则在编辑器的文件对话框中显示隐藏文件。名称以 . 开头的文件被视为隐藏文件(例如 .hidden_file)。


int filesystem/file_dialog/thumbnail_size

编辑器的文件对话框中使用的缩略图大小(单位为像素)。另请参阅 docks/filesystem/thumbnail_size


String filesystem/import/blender/blender3_path

包含 Blender 可执行文件的目录,导入时会使用 Blender 将 Blender 3D 场景文件 .blend 转换为 glTF 2.0 格式。需要 Blender 3.0 及更高版本。

要为指定项目启用这个功能,请使用 ProjectSettings.filesystem/import/blender/enabled


int filesystem/import/blender/rpc_port

用于与 Godot 创建的 Blender 可执行文件进程进行远程过程调用(RPC)通信的端口号。

将其设置为 0 会有效禁用与 Godot 的通信和 Blender 进程,从而降低性能。


float filesystem/import/blender/rpc_server_uptime

Blender 进程的最大空闲运行时间(单位为秒)。

能够在给定的秒数内,防止 Godot 每次导入都创建一个新的进程。


String filesystem/import/fbx/fbx2gltf_path

包含 FBX2glTF 可执行文件的目录,导入时会使用 FBX2glTF 将 Autodesk FBX 3D 场景文件 .fbx 转换为 glTF 2.0 格式。

要为指定项目启用这个功能,请使用 ProjectSettings.filesystem/import/fbx/enabled


bool filesystem/on_save/compress_binary_resources

如果为 true,则对二进制资源使用无损压缩。


bool filesystem/on_save/safe_save_on_backup_then_rename

如果为 true,当保存文件时,编辑器会将旧文件重命名为不同的名称,保存一个新文件,然后只有在新文件保存后,才删除旧文件。如果编辑器或操作系统在保存时意外退出(例如,由于崩溃或断电),这会降低数据丢失的可能性。

注意:在 Windows 上,该功能可能会与某些防病毒程序产生负面的交互。在这种情况下,可能必须将其设置为 false,以防止出现文件锁定问题。


String filesystem/tools/oidn/oidn_denoise_path

包含开放图像去噪(OIDN)可执行文件的目录路径,可选择用于去噪光照贴图。它可以从 openimagedenoise.org 下载。

要为特定项目启用该功能,请使用 ProjectSettings.rendering/lightmapping/denoising/denoiser


int interface/editor/accept_dialog_cancel_ok_buttons

如何在编辑器的 AcceptDialog 中定位取消和确定按钮。不同的平台有不同的标准行为,可以用这个设置来覆盖。如果你在 Windows 和 macOS/Linux 上都使用 Godot,而且你的 Godot 肌肉记忆比你的操作系统记忆更强,那么这一点很有用。

  • Auto 遵守平台约定:在 macOS 和 Linux 上取消在前,在 Windows 上确定在前。

  • Cancel First 强制为取消/确定的顺序。

  • OK First 强制为确定/取消的顺序。


bool interface/editor/automatically_open_screenshots

如果为 true,则在使用编辑器 > 截图动作截取屏幕截图后,使用与 .png 文件关联的默认程序自动打开该屏幕截图。


String interface/editor/code_font

脚本编辑器所使用的字体。必须是 Font 类型的资源,例如 .ttf.otf 字体文件。


int interface/editor/code_font_contextual_ligatures

为当前配置的代码字体启用的字体连字。并非所有字体都包含对连字的支持。

注意:编辑器默认的代码字体(JetBrains Mono)在其字体文件中具有上下文连字。


String interface/editor/code_font_custom_opentype_features

要使用的自定义 OpenType 特性列表,需要当前配置的代码字体支持。并非所有字体都支持自定义 OpenType 特性。该字符串应遵循 OpenType 规范。

注意:编辑器默认的代码字体(JetBrains Mono)在其字体文件中具有自定义 OpenType 特性,但是目前还没有文档记录的清单。


String interface/editor/code_font_custom_variations

要使用的备选字符列表,需要当前配置的代码字体支持。并非所有字体都支持自定义变体。该字符串应遵循 OpenType 规范。

注意:编辑器默认的代码字体(JetBrains Mono)在其字体文件中有备选字符,但是有还没有文档记录的清单。


int interface/editor/code_font_size

脚本编辑器中的字体大小。该设置不会影响“输出”面板的字体大小(请参阅 run/output/font_size)。


float interface/editor/custom_display_scale

要使用的自定义编辑器缩放系数。这可用于具有非常高 DPI 的显示器,其中 200% 的缩放系数是不够的。

注意:只有当 interface/editor/display_scale 被设置为 自定义(Custom) 时才有效。


bool interface/editor/debug/enable_pseudolocalization

如果为 true,则延长编辑器的可本地化字符串,并将其字符替换为重音变体。这允许轻松发现不可本地化的字符串,同时还确保 UI 布局在字符串变长时不会中断(因为许多语言会要求字符串变长)。

这是一个调试功能,只有在编辑器本身工作时才能启用。


int interface/editor/display_scale

用于编辑器界面的显示缩放系数。更高的值更适合 hiDPI/Retina 显示器。

如果被设置为 Auto,则编辑器缩放将根据屏幕分辨率和报告的显示 DPI 自动确定。这种启发式算法并不总是理想的,这意味着可以通过手动设置编辑器缩放来获得更好的结果。

如果被设置为 Custom,则将使用 interface/editor/custom_display_scale 中的缩放值。


String interface/editor/editor_language

用于编辑器界面的语言。

翻译由社区提供。如果发现错误,请在 Weblate 上为编辑器翻译作出贡献!


int interface/editor/editor_screen

显示编辑器所优先使用的监视器。


bool interface/editor/expand_to_title

将主编辑窗口内容扩展到标题区域,需要 DisplayServer 支持。见 DisplayServer.WINDOW_FLAG_EXTEND_TO_TITLE

专用于 macOS 平台。


int interface/editor/font_antialiasing

FreeType 的字体抗锯齿模式,用于渲染编辑器字体。大多数字体在禁用抗锯齿的情况下并不好看,所以建议保持启用,除非你使用的是像素风字体。


int interface/editor/font_hinting

用于编辑器字体的字体提示模式。FreeType 支持以下字体提示模式:

  • 无(None):光栅化字体时不使用字体提示。这会产生一个流畅的字体,但看起来可能会模糊。

  • Light:仅在 X 轴上使用提示。这是字体清晰度和平滑度之间的折衷。

  • Normal:在 X 和 Y 轴上使用提示。这会产生清晰的字体,但看起来不是很流畅。

如果被设置为 Auto,字体提示模式将被设置为匹配当前使用的操作系统。这意味着 Light 提示模式将在 Windows 和 Linux 上使用,而 None 提示模式将在 macOS 上使用。


int interface/editor/font_subpixel_positioning

渲染编辑器字体字形时要使用的子像素定位模式。这对主字体和代码字体都有影响。禁用 ,渲染速度最快,使用的内存最少。自动 ,只对小尺寸的字体使用子像素定位(这里的好处是最明显的)。二分之一像素四分之一像素对所有编辑器字体强制使用相同的子像素定位模式,无论其大小如何(其中四分之一像素是最高质量的选项)。


float interface/editor/low_processor_mode_sleep_usec

启用低处理器使用模式时帧之间的睡眠时间(以微秒为单位)。更高的值将导致更低的 CPU/GPU 使用率,这可以延长笔记本电脑的电池寿命。但是,更高的值会导致编辑器的响应速度更慢。默认值设置为允许在高达 144 Hz 的显示器上实现最大流畅度。另见 interface/editor/unfocused_low_processor_mode_sleep_usec


String interface/editor/main_font

用于编辑器界面的字体。必须是 Font 类型的资源,例如 .ttf.otf 字体文件。


String interface/editor/main_font_bold

用于编辑器界面中粗体文本的字体。必须是 Font 类型的资源,例如 .ttf.otf 字体文件。


int interface/editor/main_font_size

编辑器界面中字体的大小。


bool interface/editor/mouse_extra_buttons_navigate_history

如果为 true,鼠标的额外侧键将可用于在脚本编辑器的文件历史记录中导航。如果正将侧键用于其他目的(例如 VoIP 程序中的一键通按钮),请将该项设置为 false


int interface/editor/project_manager_screen

显示项目管理器的首选显示器。


bool interface/editor/save_each_scene_on_quit

如果为 false,则当正退出编辑器或正退出到项目列表时,确认保存动作后,编辑器将保存所有场景。如果为 true,则编辑器将要求单独保存每个场景。


bool interface/editor/separate_distraction_mode

如果为 true,则编辑器的 Script 选项卡,将具有与 2D/3D/AssetLib 选项卡不同的干扰模式设置。如果为 false,无干扰模式切换在所有选项卡之间共享。


int interface/editor/show_internal_errors_in_toast_notifications

如果启用,则会使用吐司通知的形式显示引擎的内部错误(可通过点击编辑器底部的“铃铛”图标切换)。无论这个设置项是什么值,非引擎内部错误都会在吐司通知中显示。

默认的 Auto 只会在使用 dev=yes 选项(默认为 dev=no)编译的编辑器中启用这个行为。


bool interface/editor/single_window_mode

如果为 true,则在主编辑器窗口中嵌入停靠面板等模态窗口。当启用单窗口模式时,工具提示也将被嵌入到主编辑器窗口中,这意味着它们不能显示在编辑器窗口之外。


float interface/editor/unfocused_low_processor_mode_sleep_usec

当编辑器窗口未聚焦时,启用低处理器使用模式时帧之间的睡眠量(以微秒为单位)。更高的值将导致更低的 CPU/GPU 使用率,这可以延长笔记本电脑的电池寿命(如果编辑器必须连续重绘,还可以提高正在运行的项目的性能)。但是,更高的值会导致编辑器的响应速度变慢。默认值设置会在编辑器窗口未聚焦时,将编辑器限制为 20 FPS。另见 interface/editor/low_processor_mode_sleep_usec


bool interface/editor/use_embedded_menu

如果为 true,则编辑器的主菜单使用嵌入式 MenuBar,不使用系统全局菜单。

专用于 macOS 平台。


float interface/inspector/float_drag_speed

在检查器中通过拖动来调整浮点数大小时的基础变化速度。


int interface/inspector/max_array_dictionary_items_per_page

在检查器中,为 ArrayDictionary 的每一“页”显示多少项目。值越高,每一页可以查看的值就越多,但也会花越多的时间进行加载。在编辑器中选中具有很多数组或字典属性的节点时,这些多出来的加载时间就会很显著。


bool interface/inspector/show_low_level_opentype_features

如果为 true,则在 Font 编辑器中,显示被字体文件标记为 hidden 的 OpenType 特性。


bool interface/multi_window/enable

如果为 true,将启用编辑器的多窗口支持。以下面板可以成为独立窗口(浮动):停靠面板、脚本编辑器、着色器编辑器。

注意:interface/editor/single_window_modetrue 时,多窗口支持始终处于禁用状态。


bool interface/multi_window/maximize_window

如果为 true,则将面板设为浮动时会将其最大化。

如果为 false,则将面板设为浮动时,位置和大小会和编辑器窗口中的状态一致(不含窗口边框)。


bool interface/multi_window/restore_windows_on_load

如果为 true,则编辑器在退出时会保存浮动面板的位置、大小、屏幕。下次启动时,会尽可能让浮动面板在保存的位置、大小、屏幕处保持浮动。


int interface/scene_tabs/display_close_button

控制关闭(X)按钮何时显示在编辑器顶部的场景选项卡上。


int interface/scene_tabs/maximum_width

顶部编辑器中每个场景选项卡的最大宽度(以像素为单位)。


bool interface/scene_tabs/show_script_button

如果为 true,则在每个场景选项卡旁边显示一个按钮,点击该按钮会打开场景的“主导”脚本。“主导”脚本是场景层次结构中位于最高级别的脚本。


bool interface/scene_tabs/show_thumbnail_on_hover

如果为 true,当鼠标悬停在场景选项卡上时,会显示自动生成的缩略图。场景缩略图在保存场景时生成。


Color interface/theme/accent_color

用于编辑器中“高亮显示”的用户界面元素(按下和悬停的项目)的颜色。


float interface/theme/additional_spacing

在编辑器中为按钮和列表项添加的间距(以像素为单位)。增加该值有助于提高触摸屏的可用性,但代价是减少可用屏幕空间。


Color interface/theme/base_color

用于编辑器中用户界面元素的基色。次要颜色(例如较深/较浅的变体)是从这种颜色派生的。


int interface/theme/border_size

界面元素的边框大小(单位为像素)。


float interface/theme/contrast

当派生编辑器主题的基色时,使用的对比度系数(参见 interface/theme/base_color)。当使用正值时,派生的颜色将比基色更深。该对比度系数可以设置为负值,这将使派生颜色比基色更浅。对于浅色主题,负对比度通常看起来更好。


int interface/theme/corner_radius

界面元素的圆角半径(单位为像素)。0 则为正方形。


String interface/theme/custom_theme

用于编辑器的自定义主题资源。必须是 .tres.res 格式的 Godot 主题资源。


bool interface/theme/draw_extra_borders

如果 true,则在编辑器中的交互式 UI 元素周围绘制额外的边框。使用Black (OLED)主题预设时该项会自动启用,因为该主题预设使用全黑背景。


int interface/theme/icon_and_font_color

在编辑器中使用的图标和字体的配色方案。

  • Auto 根据 interface/theme/base_color 自动确定要使用的配色方案。

  • Dark 使字体和图标变暗(适合浅色主题)。图标颜色由编辑器按照该文件中定义的一组规则自动转换。

  • Light 使字体和图标变亮(适合深色主题)。


float interface/theme/icon_saturation

用于编辑器图标的饱和度。值越高,颜色越鲜艳。

注意:在 Godot 4.0 及更高版本中,默认编辑器图标饱和度增加了 30%。要恢复为 Godot 3.x 的图标饱和度,请将 interface/theme/icon_saturation 设置为 0.77


String interface/theme/preset

要使用的编辑器主题预设。


float interface/theme/relationship_line_opacity

在编辑器的基于 Tree 的 GUI(例如场景树停靠栏)中,绘制关系线时使用的不透明度。


bool interface/touchscreen/enable_long_press_as_right_click

如果为 true,长按触摸屏被视为右键点击。

注意:在触摸屏设备上默认为 true


bool interface/touchscreen/enable_pan_and_scale_gestures

如果为 true,则在触摸屏设备上启用两指平移和缩放手势。

注意:在触摸屏设备上默认为 true


bool interface/touchscreen/increase_scrollbar_touch_area

如果为 true,则增加滚动条触摸区域以提高触摸屏设备的可用性。

注意:在触摸屏设备上默认为 true


float interface/touchscreen/scale_gizmo_handles

指定为了在提高触摸屏设备的可用性而对编辑器小工具手柄应用的缩放乘数。

注意:在非触摸屏设备上默认为 1


String network/debug/remote_host

启动远程调试器时要监听的地址。这可以设置为 0.0.0.0 以允许外部客户端连接到远程调试器(而不是将远程调试器限制为来自 localhost 的连接)。


int network/debug/remote_port

启动远程调试器时要监听的端口。如果配置的数字已被另一个应用程序占用,Godot 将尝试使用高于该配置数字的端口号。


String network/http_proxy/host

用于在编辑器中联系 HTTP 和 HTTPS 代理的主机(用于资产库和导出模板下载)。另见 network/http_proxy/port

注意:Godot 目前不会自动使用系统代理设置,所以如果需要,必须在此处手动输入。


int network/http_proxy/port

用于在编辑器中联系 HTTP 和 HTTPS 代理的端口号(用于资产库和导出模板下载)。另请参阅 network/http_proxy/host

注意:Godot 目前不会自动使用系统代理设置,所以如果需要,必须在此处手动输入。


String network/tls/editor_tls_certificates

用于在编辑器中发出的 HTTP 请求(例如来自 AssetLib 选项卡)的 TLS 证书包。如果留空,将使用包含的 Mozilla 证书包


String project_manager/default_renderer

创建新项目时默认勾选的渲染器类型。可接受的字符串是“forward_plus”、“mobile”、或“gl_compatibility”。


int project_manager/sorting_order

在项目管理器中使用的排序顺序。在项目管理器中更改排序顺序时,该设置将在编辑器设置中被永久设置。


bool run/auto_save/save_before_running

如果为 true,则在运行游戏项目之前会自动保存所有场景和脚本。将该项设置为 false 可防止编辑器在没有更改的情况下保存,这可以稍微加快该游戏项目的启动速度,但它可以运行带有未保存的更改的游戏项目。(未保存的更改在正在运行的项目中将不可见。)


bool run/output/always_clear_output_on_play

如果为 true,则编辑器会在运行游戏项目时清空“输出”面板。


bool run/output/always_close_output_on_stop

如果为 true,则编辑器会在停止游戏项目时折叠“输出”面板。


bool run/output/always_open_output_on_play

如果为 true,则编辑器会在运行游戏项目时展开“输出”面板。


int run/output/font_size

编辑器底部输出面板中的字体大小。该设置不会影响脚本编辑器的字体大小(见 interface/editor/code_font_size)。


int run/window_placement/android_window

从编辑器中启动项目时,用于显示项目的 Android 窗口。

注意:仅在 Android 编辑器中可用。


int run/window_placement/rect

从编辑器启动游戏项目时,用于显示该游戏项目的窗口模式。


Vector2 run/window_placement/rect_custom_position

从编辑器启动游戏项目时,使用的自定义位置(相对于左上角,单位为像素)。仅当 run/window_placement/rect 设置为 Custom Position 时才有效。


int run/window_placement/screen

从编辑器启动游戏项目时,用于显示该游戏项目的显示屏。


如果为 true ,则文本光标按照 text_editor/appearance/caret/caret_blink_interval 来闪烁。如果长时间使用脚本编辑器,禁用这个设置可以改善笔记本电脑的电池寿命,因为可以减少编辑器需要重绘的频率。


文本光标闪烁的时间间隔(单位为秒)。另见 text_editor/appearance/caret/caret_blink


bool text_editor/appearance/caret/highlight_all_occurrences

如果为 true,则在脚本编辑器中高亮显示当前所选文本的所有匹配项。另请参阅 text_editor/theme/highlighting/word_highlighted_color


bool text_editor/appearance/caret/highlight_current_line

如果为 true,则使用 text_editor/theme/highlighting/current_line_color 为文本光标当前所在行的背景着色。


int text_editor/appearance/caret/type

在脚本编辑器中使用的文本光标的形状。Line 会在当前字符的左侧显示一条垂直线,而 Block 会在当前字符上方显示一个轮廓。


int text_editor/appearance/guidelines/line_length_guideline_hard_column

在哪列将细线显示为脚本的行长参考线。这通常应该大于 text_editor/appearance/guidelines/line_length_guideline_soft_column


int text_editor/appearance/guidelines/line_length_guideline_soft_column

在哪行将一条非常细的线显示为脚本的行长参考线。这通常应该低于 text_editor/appearance/guidelines/line_length_guideline_hard_column


bool text_editor/appearance/guidelines/show_line_length_guidelines

如果为 true,则显示行长度参考线以帮助控制行的长度。另请参阅 text_editor/appearance/guidelines/line_length_guideline_soft_columntext_editor/appearance/guidelines/line_length_guideline_hard_column


bool text_editor/appearance/gutters/highlight_type_safe_lines

如果为 true,则通过使用 text_editor/theme/highlighting/safe_line_number_color 而不是 text_editor/theme/highlighting/line_number_color,来显示行号颜色以突出显示类型安全行。类型安全行是指所有变量的类型在编译时已知的代码行。由于类型化的指令,这些类型安全的行可能会运行得更快。


bool text_editor/appearance/gutters/line_numbers_zero_padded

如果为 true,则显示的行号使用零填充(例如 7 会变成 007)。


bool text_editor/appearance/gutters/show_info_gutter

如果为 true,则会在左侧显示一个装订线,为存在信号连接和覆盖方法的方法显示图标。


bool text_editor/appearance/gutters/show_line_numbers

如果为 true,则会在左侧的装订线中显示行号。


int text_editor/appearance/lines/autowrap_mode

如果 text_editor/appearance/lines/word_wrap 设置为 1,则设置文本换行模式。每种模式的行为见 AutowrapMode


bool text_editor/appearance/lines/code_folding

如果为 true,则显示缩进的代码小节旁边的折叠箭头,并允许代码折叠。如果为 false,则隐藏缩进的代码小节旁边的折叠箭头,并禁止代码折叠。


int text_editor/appearance/lines/word_wrap

如果为 true,则将长行换成多行以避免水平滚动。这是一个仅显示的功能;它实际上并没有在脚本中插入换行符。


int text_editor/appearance/minimap/minimap_width

脚本编辑器中小地图的宽度(单位为像素)。


bool text_editor/appearance/minimap/show_minimap

如果为 true,则在滚动条附近绘制脚本概览。小地图可以被左键点击,以“绝对”的方式直接滚动到某个位置。


bool text_editor/appearance/whitespace/draw_spaces

如果为 true,则会将空格字符绘制为居中的点。


bool text_editor/appearance/whitespace/draw_tabs

如果为 true,则会将制表符绘制为人字形。


int text_editor/appearance/whitespace/line_spacing

行与行之间要增加的空间(像素)。更大的行间距可以帮助提高可读性,但代价是在屏幕上显示更少的行。


bool text_editor/behavior/files/auto_reload_scripts_on_external_change

如果为 true,当脚本被外部编辑器修改和保存时,会自动在编辑器中重新加载脚本。


int text_editor/behavior/files/autosave_interval_secs

如果设置为大于 0 的值,则按照指定的时间间隔(以秒为单位)会自动保存当前脚本。这可用于防止编辑器崩溃时的数据丢失。


bool text_editor/behavior/files/convert_indent_on_save

如果为 true,则在保存脚本时转换缩进,以匹配脚本编辑器的缩进设置。另见 text_editor/behavior/indent/type


bool text_editor/behavior/files/restore_scripts_on_load

如果为 true,则在给定项目上重新打开编辑器时,重新打开在上次会话中打开的脚本。


bool text_editor/behavior/files/trim_trailing_whitespace_on_save

如果为 true,则在保存脚本时修剪尾随空格。尾随空格是指放置在行尾的制表符和空格字符。由于这些没有任何实际用途,因此可以并且应该将其移除,以减少版本控制差异的干扰。


bool text_editor/behavior/indent/auto_indent

如果为 true,则在按 Enter 键时,将根据新行上方的代码块,自动缩进代码。


int text_editor/behavior/indent/size

使用制表符缩进时,确定每个制表符的长度。使用空格缩进时,确定按下 Tab 和执行自动缩进时,插入了多少空格。


int text_editor/behavior/indent/type

要使用的缩进风格(制表符或空格)。

注意:GDScript 风格指南建议使用制表符进行缩进。建议仅当需要处理当前使用空格进行缩进的游戏项目时,才更改这项设置。


bool text_editor/behavior/navigation/drag_and_drop_selection

如果为 true,则允许在脚本编辑器中拖放文本以移动文本。如果发现不小心在脚本编辑器中拖放了文本,请禁用该项。


bool text_editor/behavior/navigation/move_caret_on_right_click

如果为 true,则在脚本编辑器中右键点击某处时,文本光标将被移动(像左键点击或中键点击时一样)。如果为 false,文本光标只会在左键点击或中键点击某个位置时移动。


bool text_editor/behavior/navigation/scroll_past_end_of_file

如果为 true,则允许滚动越过文件的末尾。


bool text_editor/behavior/navigation/smooth_scrolling

如果为 true,则允许在子行间隔内滚动,并在使用鼠标滚轮滚动时启用平滑的滚动动画。

注意:text_editor/behavior/navigation/smooth_scrolling 当前在 ProjectSettings.physics/common/physics_ticks_per_second 从其默认值(60)显著增加的游戏项目中表现不佳。在这种情况下,建议禁用该设置。


bool text_editor/behavior/navigation/stay_in_script_editor_on_node_selected

如果为 true,则在场景树面板中选择节点时,可防止自动在脚本和 2D/3D 屏幕之间切换。


int text_editor/behavior/navigation/v_scroll_speed

每个鼠标滚轮增量滚动的像素数。使用鼠标滚轮时,较高的值会使脚本滚动得更快。

注意:可以在按住 Alt 的同时,使用鼠标滚轮将滚动速度暂时提高 5 倍。


bool text_editor/completion/add_type_hints

如果为 true ,则在使用代码自动补全时,或在按下 Ctrl 键的同时将节点拖放到脚本编辑器中创建 onready 变量时,将添加静态类型提示,类型提示类似 -> void: int


bool text_editor/completion/auto_brace_complete

如果为 true,则在使用代码补全时,自动补全括号。


float text_editor/completion/code_complete_delay

用户停止输入后,应显示自动补全建议的延迟时间(以秒为单位)。


bool text_editor/completion/code_complete_enabled

如果为 true,代码补全将在 text_editor/completion/code_complete_delay 之后自动触发。如果为 false,你仍然可以通过按 Ctrl + Space(在 macOS 上为 Cmd + Space)手动触发补全。


bool text_editor/completion/colorize_suggestions

如果为 true,则启用自动补全建议中某些项目的着色,例如向量分量。


bool text_editor/completion/complete_file_paths

如果为 true,则在 load()preload() 等方法中,为文件路径提供自动补全建议。


float text_editor/completion/idle_parse_delay

用户停止输入后,脚本编辑器应检查错误的延迟时间(以秒为单位)。


bool text_editor/completion/put_callhint_tooltip_below_current_line

如果为 true,除非当前行下方的屏幕上没有空间,否则代码补全工具提示,将出现在当前行下方。如果为 false,则代码补全工具提示,将出现在当前行上方。


bool text_editor/completion/use_single_quotes

如果为 true,则执行带单引号的字符串自动补全。如果为 false,则执行带双引号的字符串自动补全(则与 GDScript 风格指南一致)。


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

如果为 true,则在编辑器帮助的左侧显示目录(编辑脚本时出现成员概览的位置)。


bool text_editor/script_list/show_members_overview

如果为 true,则在脚本编辑器的左侧显示当前脚本的成员变量和函数的概览。另见 text_editor/script_list/sort_members_outline_alphabetically


bool text_editor/script_list/sort_members_outline_alphabetically

如果为 true,则使用字母顺序,对成员大纲(位于脚本编辑器的左侧)进行排序。如果为 false,则根据在脚本中找到成员的顺序,对成员大纲进行排序。

注意:仅当 text_editor/script_list/show_members_overviewtrue 时有效。


String text_editor/theme/color_theme

脚本编辑器中,使用的语法主题。

可以使用脚本编辑器顶部的文件 > 主题 > 另存为...,从当前设置中保存自己的语法主题。然后,语法主题将在本地颜色主题列表中可用。

可以在 godot-syntax-themes 存储库中,找到要安装的其他语法主题。


Color text_editor/theme/highlighting/background_color

脚本编辑器中,背景的颜色。如果设置为半透明的颜色,会透出后面的编辑器主题的基础色。


Color text_editor/theme/highlighting/base_type_color

脚本编辑器中,基础类型的颜色(用于 Vector2Vector3Color 等类型)。


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

脚本编辑器中,注释的颜色。

注意:在 GDScript 中,与 Python 不同,多行字符串不被视为注释,而是使用字符串高亮显示颜色。


Color text_editor/theme/highlighting/completion_background_color

脚本编辑器中,自动补全框的背景色。


Color text_editor/theme/highlighting/completion_existing_color

脚本编辑器中,自动补全框的背景颜色,用于高亮显示补全结果中的现有字符。这应该是半透明的颜色,以便在后面可以看到 text_editor/theme/highlighting/completion_selected_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

脚本编辑器中,控制流关键字的颜色(用于 ifforreturn 等关键字)。


Color text_editor/theme/highlighting/current_line_color

脚本编辑器中,文本光标当前所在行的背景色。这应该被设置为半透明颜色,以便它可以显示在其他的行颜色修饰之上,例如 text_editor/theme/highlighting/mark_color


Color text_editor/theme/highlighting/doc_comment_color

脚本编辑器的文档注释颜色。在 GDScript 中,这被用于以 ## 开头的注释。在 C# 中,这被用于以 ////** 开头的注释。


Color text_editor/theme/highlighting/engine_type_color

脚本编辑器中,引擎类型的颜色(Vector2Vector3Color……)。


Color text_editor/theme/highlighting/executing_line_color

脚本编辑器中,调试器执行行图标(显示在装订线中)的颜色。


Color text_editor/theme/highlighting/folded_code_region_color

脚本编辑器的背景行高亮颜色,用于折叠代码区块。


Color text_editor/theme/highlighting/function_color

脚本编辑器中,函数调用的颜色。

注意:当使用 GDScript 语法高亮器时,这将被语法主题中为函数定义(例如:func _ready(): )配置的函数定义颜色所取代。


Color text_editor/theme/highlighting/keyword_color

脚本编辑器中,非控制流关键字的颜色(用于关键字,如 varfuncextends、...)。


Color text_editor/theme/highlighting/line_length_guideline_color

脚本编辑器中,行长参考线的颜色。“硬”行长参考线将使用该颜色绘制,而“软”行长参考线将使用其一半的不透明度绘制。


Color text_editor/theme/highlighting/line_number_color

脚本编辑器中,行号的颜色。另请参阅 text_editor/theme/highlighting/safe_line_number_color


Color text_editor/theme/highlighting/mark_color

脚本编辑器中,有错误的行的背景颜色。这应该被设置为半透明颜色,以便它可以显示在其他的行颜色修饰之上,例如 text_editor/theme/highlighting/current_line_color


Color text_editor/theme/highlighting/member_variable_color

脚本编辑器中,对象上成员变量(例如 self.some_property)的颜色。

注意:该颜色不用于局部变量的声明和访问。


Color text_editor/theme/highlighting/number_color

脚本编辑器中,数字(整数和浮点数)的颜色。


Color text_editor/theme/highlighting/safe_line_number_color

脚本编辑器中,类型安全行号的颜色。另请参阅 text_editor/theme/highlighting/line_number_color

注意:仅当 text_editor/appearance/gutters/highlight_type_safe_linestrue 时才显示。


Color text_editor/theme/highlighting/search_result_border_color

脚本编辑器中,搜索结果边框的颜色。该边框有助于进一步关注搜索结果。将该颜色的不透明度设置为 0 可禁用该边框。


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

脚本编辑器中,文本的背景颜色。这应该被设置为半透明颜色,以便它可以显示在其他的行颜色修饰之上,例如 text_editor/theme/highlighting/current_line_color


Color text_editor/theme/highlighting/user_type_color

脚本编辑器中,用户定义的类型(使用 class_name )的颜色。


Color text_editor/theme/highlighting/word_highlighted_color

脚本编辑器中,通过选择单词而高亮显示的颜色。仅当 text_editor/appearance/caret/highlight_all_occurrencestrue 时可见。


方法说明

void add_property_info ( Dictionary info )

向属性添加自定义属性信息。该字典必须包含:

示例:

var settings = EditorInterface.get_editor_settings()
settings.set("category/property_name", 0)

var property_info = {
    "name": "category/property_name",
    "type": TYPE_INT,
    "hint": PROPERTY_HINT_ENUM,
    "hint_string": "one,two,three"
}

settings.add_property_info(property_info)

bool check_changed_settings_in_group ( String setting_prefix ) const

检查已改变的设置中是否存在前缀为 setting_prefix 的设置项。另见 get_changed_settings


void erase ( String property )

擦除名称由 property 指定的设置项。


PackedStringArray get_changed_settings ( ) const

获取上次保存以来发生更改的设置项数组。请注意,成功保存后内部会将 changed_settings 清空,所以一般最适合使用该方法的地方是在处理 NOTIFICATION_EDITOR_SETTINGS_CHANGED 时。


PackedStringArray get_favorites ( ) const

返回该游戏项目收藏的文件和目录的列表。


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

返回由 sectionkey 指定的特定于项目的元数据。如果该元数据不存在,则将返回 default。另见 set_project_metadata


PackedStringArray get_recent_dirs ( ) const

返回该游戏项目在文件对话框中最近访问的文件夹的列表。


Variant get_setting ( String name ) const

返回由 name 指定的设置项的值。等价于在 EditorSettings 实例上使用 Object.get


bool has_setting ( String name ) const

如果由 name 指定的设置项存在则返回 true,否则返回 false


void mark_setting_changed ( String setting )

将传入的编辑器设置项标记为已更改,请参阅 get_changed_settings。只有存在的设置(参见 has_setting)才会被接受。


void set_builtin_action_override ( String name, InputEvent[] actions_list )

使用 actions_list 中定义的输入动作,覆盖内置的编辑器动作 name


void set_favorites ( PackedStringArray dirs )

设置该游戏项目收藏的文件和目录的列表。


void set_initial_value ( StringName name, Variant value, bool update_current )

将由 name 指定的设置项的初始值设置为 value。用于在“编辑器设置”中为“恢复”按钮提供值。如果 update_current 为 true,则该设置的当前值也会被设为 value


void set_project_metadata ( String section, String key, Variant data )

设置由 sectionkeydata 指定的特定于项目的元数据。该元数据保存在项目文件夹之外,因此不会加入到版本控制中。另见 get_project_metadata


void set_recent_dirs ( PackedStringArray dirs )

设置该游戏项目在文件对话框中最近访问的文件夹的列表。


void set_setting ( String name, Variant value )

将由 name 指定的设置项设置为 value。等价于在 EditorSettings 实例上使用 Object.set