ProjectSettings¶
Inherits: Object
包含全局变量,可以从任何地方访问。
描述¶
Contains global variables accessible from everywhere. Use get_setting, set_setting or has_setting to access them. Variables stored in project.godot
are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options.
When naming a Project Settings property, use the full path to the setting including the category. For example, "application/config/name"
for the project name. Category and property names can be viewed in the Project Settings dialog.
Feature tags: Project settings can be overridden for specific platforms and configurations (debug, release, ...) using feature tags.
Overriding: Any project setting can be overridden by creating a file named override.cfg
in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. Overriding will still take the base project settings' feature tags in account. Therefore, make sure to also override the setting with the desired feature tags if you want them to override base project settings on all platforms and configurations.
教程¶
属性¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
rendering/batching/parameters/colored_vertex_format_threshold |
|
|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
rendering/limits/buffers/canvas_polygon_index_buffer_size_kb |
|
|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
rendering/quality/intended_usage/framebuffer_allocation.mobile |
|
|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
rendering/quality/reflections/texture_array_reflections.mobile |
|
|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
方法¶
void |
add_property_info ( Dictionary hint ) |
void |
|
get_setting ( String name ) const |
|
globalize_path ( String path ) const |
|
has_setting ( String name ) const |
|
load_resource_pack ( String pack, bool replace_files=true, int offset=0 ) |
|
localize_path ( String path ) const |
|
property_can_revert ( String name ) |
|
property_get_revert ( String name ) |
|
save ( ) |
|
save_custom ( String file ) |
|
void |
set_initial_value ( String name, Variant value ) |
void |
|
void |
set_setting ( String name, Variant value ) |
属性说明¶
String android/modules
Default |
|
逗号分隔的自定义 Android 模块列表(必须已在 Android 导出模板中构建)使用其 Java 包路径,例如 "org/godotengine/godot/MyCustomSingleton,com/example/foo/FrenchFriesFactory"
。
注意:自 Godot 3.2.2 起,org/godotengine/godot/GodotPaymentV3
模块被弃用,取而代之的是 GodotPayment
插件,该插件应在 Android 中启用在 Plugins
部分下导出预设。在代码中访问的单例也被重命名为 GodotPayment
。
Color application/boot_splash/bg_color
Default |
|
启动界面的背景色。
bool application/boot_splash/fullsize
Default |
|
If true
, scale the boot splash image to the full window size (preserving the aspect ratio) when the engine starts. If false
, the engine will leave it at the default pixel size.
String application/boot_splash/image
Default |
|
Path to an image used as the boot splash. If left empty, the default Godot Engine splash will be displayed instead.
Note: Only effective if application/boot_splash/show_image is true
.
bool application/boot_splash/show_image
Default |
|
If true
, displays the image specified in application/boot_splash/image when the engine starts. If false
, only displays the plain color specified in application/boot_splash/bg_color.
bool application/boot_splash/use_filter
Default |
|
If true
, applies linear filtering when scaling the image (recommended for high-resolution artwork). If false
, uses nearest-neighbor interpolation (recommended for pixel art).
String application/config/custom_user_dir_name
Default |
|
该用户目录用于存储持久数据(user://
文件系统)。如果留空,user://
将解析为Godot自己的配置文件夹中特定于项目的文件夹(请参阅OS.get_user_data_dir)。如果定义了自定义目录名,将使用该名称并将其附加到系统特定的用户数据目录(与OS.get_user_data_dir中记录的Godot配置文件夹相同的父文件夹)。
必须启用 application/config/use_custom_user_dir设置才能使其生效。
String application/config/description
Default |
|
项目的描述,在项目管理器中悬停时显示为工具提示。
String application/config/icon
Default |
|
用于项目的图标,在项目加载时设置。导出时也将尽可能使用此图标。
String application/config/macos_native_icon
Default |
|
在macOS上使用的.icns
格式的图标集,用于设置游戏的图标。这在启动时通过调用OS.set_native_icon自动完成。
String application/config/name
Default |
|
The project's name. It is used both by the Project Manager and by exporters. The project name can be translated by translating its value in localization files. The window title will be set to match the project name automatically on startup.
Note: Changing this value will also change the user data folder's path if application/config/use_custom_user_dir is false
. After renaming the project, you will no longer be able to access existing data in user://
unless you rename the old folder to match the new project name. See Data paths in the documentation for more information.
String application/config/project_settings_override
Default |
|
指定一个文件来覆盖项目设置。比如说。user://custom_settings.cfg
。参见 ProjectSettings
顶部类描述中的“Overriding”以获取更多信息。
注意:不管这个设置的值如何,res://override.cfg
仍然会被读取来覆盖项目设置。
bool application/config/use_custom_user_dir
Default |
|
如果true
,项目将把用户数据保存到自己的用户目录中(请参阅application/config/custom_user_dir_name)。此设置仅在桌面平台上有效。必须在application/config/custom_user_dir_name设置中设置名称才能生效。如果false
,项目将把用户数据保存到(OS user data directory)/Godot/app_userdata/(project name)
。
Default |
|
如果 true
,项目将使用一个隐藏目录(.import
)来存储项目特定的数据(元数据、着色器缓存等)。
如果 false
,将使用非隐藏目录 (import
)。
注意:更改此设置后重新启动应用程序。
注意: 更改此值有助于在平台上或使用不允许隐藏目录模式的第三方工具。仅当您知道您的环境需要时才修改此设置,因为更改默认设置会影响与某些需要默认 .import
文件夹的外部工具或插件的兼容性。
String application/config/windows_native_icon
Default |
|
以.ico
格式设置的图标,在Windows上用于设置游戏的图标。这在启动时通过调用OS.set_native_icon自动完成。
bool application/run/delta_smoothing
Default |
|
帧增量的时间样本会受到平台引入的随机变化的影响,即使由于 V-Sync 以固定间隔显示帧也是如此。这会导致抖动。通过过滤输入增量以校正刷新率的微小波动,增量平滑通常可以提供更好的结果。
注意: Delta 平滑仅在 display/window/vsync/use_vsync 开启时尝试,因为它在没有 V-Sync 的情况下无法正常工作。
在最初激活平滑之前,以稳定的帧速率可能需要几秒钟的时间。它只会在性能足以以刷新率渲染帧的机器上激活。
bool application/run/delta_sync_after_draw
Default |
|
实验性的。 将每一帧的delta时间的测量转移到绘图发生之后。这可能会导致更一致的延迟和减少帧的停顿。
bool application/run/disable_stderr
Default |
|
如果 true
,则禁用打印到标准错误。如果 true
,这也会隐藏由 @GDScript.push_error 和 @GDScript.push_warning 打印的错误和警告消息。另见application/run/disable_stdout。
对此设置的更改只会在重新启动应用程序时应用。
bool application/run/disable_stdout
Default |
|
如果 true
,则禁用打印到标准输出。这相当于使用 --quiet
命令行参数启动编辑器或项目。另见application/run/disable_stderr。
对此设置的更改只会在重新启动应用程序时应用。
bool application/run/flush_stdout_on_print
Default |
|
如果 true
,则每次打印一行时刷新标准输出流。这会影响终端日志记录和文件日志记录。
运行项目时,如果希望由 systemd/journalctl 等服务管理器收集日志,则必须启用此设置。默认情况下,在发布版本中禁用此设置,因为如果快速连续打印大量行,则在每个打印行上刷新都会对性能产生负面影响。此外,如果启用此设置,如果应用程序崩溃或以其他方式被用户杀死(不会“正常”关闭),则仍会成功写入日志文件。
注意: 无论此设置如何,标准错误流 (stderr
) 在打印一行时总是被刷新。
对此设置的更改只会在重新启动应用程序时应用。
bool application/run/flush_stdout_on_print.debug
Default |
|
调试构建覆盖application/run/flush_stdout_on_print,因为在调试过程中性能不那么重要。
仅在重新启动应用程序时才会应用此设置的更改。
int application/run/frame_delay_msec
Default |
|
强制主循环中帧之间的延迟(以毫秒为单位)。如果您计划禁用垂直同步,这可能很有用。
bool application/run/low_processor_mode
Default |
|
如果true
,则启用低处理器使用模式。此设置仅适用于桌面平台。如果视觉上没有任何变化,屏幕不会被重绘。这是为了编写应用程序和编辑器,但在大多数游戏中这是非常无用的(并可能损害性能)。
int application/run/low_processor_mode_sleep_usec
Default |
|
启用低处理器使用模式时帧间的睡眠量(以微秒计)。值越高,CPU占用率越低。
String application/run/main_scene
Default |
|
项目运行时将加载的主场景文件的路径。
float audio/channel_disable_threshold_db
Default |
|
当声音在给定的时间内低于给定的dB阈值时,音频总线将自动关闭。这可以节省CPU,因为分配给该总线的效果将不再做任何处理。
float audio/channel_disable_time
Default |
|
当声音在给定的时间内低于给定的dB阈值时,音频总线将自动关闭。这可以节省CPU,因为分配给该总线的效果将不再做任何处理。
String audio/default_bus_layout
Default |
|
项目中使用的默认AudioBusLayout资源文件,除非被场景覆盖。
String audio/driver
指定要使用的音频驱动程序。此设置取决于平台,因为每个平台支持不同的音频驱动程序。如果留空,将使用默认音频驱动程序。
bool audio/enable_audio_input
Default |
|
如果true
,将允许麦克风输入。这需要在导出到Android或iOS时设置适当的权限。
int audio/mix_rate
Default |
|
用于音频的混合率(单位:Hz)。一般来说,最好不要碰这个,把它留给主机操作系统。
int audio/mix_rate.web
Default |
|
更安全地覆盖 Web 平台中的 audio/mix_rate。这里 0
的意思是“让浏览器选择”(因为有些浏览器不喜欢强制混合速率)。
int audio/output_latency
Default |
|
指定偏好的音频输出延迟,单位为毫秒。值越低,音频延迟越小,代价是 CPU 占用率会更高。在较慢的硬件上,使用较低的值可能产生爆裂声。
音频输出延迟可能受到宿主的操作系统和音频硬件驱动的限制。如果宿主无法提供指定的音频输出延迟,Godot 会尝试使用宿主所允许范围内与其最接近的值。因此你应当始终使用 AudioServer.get_output_latency 获取实际的音频输出延迟。
注意: 此设置在 Windows 上会被忽略。
int audio/output_latency.web
Default |
|
在网络平台中更安全地覆盖 audio/output_latency,以避免音频问题,尤其是在移动设备上。
int audio/video_delay_compensation_ms
Default |
|
播放视频时设置为硬编码音频延迟。除非你知道自己在做什么,否则最好不要动它。
int compression/formats/gzip/compression_level
Default |
|
gzip的默认压缩级别。影响压缩的场景和资源。较高的级别会以压缩速度为代价导致文件变小。解压缩速度大多不受压缩级别的影响。-1
使用默认的gzip压缩级别,该级别与6
相同,但由于底层zlib更新,未来可能会发生变化。
int compression/formats/zlib/compression_level
Default |
|
Zlib的默认压缩级别。影响压缩的场景和资源。较高的级别会以压缩速度为代价导致文件变小。解压缩速度大多不受压缩级别的影响。-1
使用默认的gzip压缩级别,该级别与6
相同,但由于底层zlib更新,未来可能会发生变化。
int compression/formats/zstd/compression_level
Default |
|
Zstandard的默认压缩级别。影响压缩的场景和资源。较高的级别会以压缩速度为代价导致文件变小。解压缩速度大多不受压缩级别的影响。
bool compression/formats/zstd/long_distance_matching
Default |
|
在Zstandard中启用 long-distance matching 。
int compression/formats/zstd/window_log_size
Default |
|
使用与Zstandard的长距离匹配进行压缩时,允许的最大大小限制(2的幂)。更高的值可以产生更好的压缩,但是在压缩和解压缩时需要更多的内存。
bool debug/gdscript/completion/autocomplete_setters_and_getters
Default |
|
如果true
,则在脚本编辑器的自动完成结果中显示getters和setters。这个设置是为了在移植旧项目(戈多2)时使用,因为使用成员变量是从戈多3开始的首选风格。
bool debug/gdscript/warnings/constant_used_as_function
Default |
|
如果true
,则当常量用作函数时会发出警告。
bool debug/gdscript/warnings/deprecated_keyword
Default |
|
如果true
,当使用已废弃的关键字如slave
时,启用警告。
bool debug/gdscript/warnings/enable
Default |
|
如果true
,则启用特定的GDScript警告(请参阅debug/gdscript/warnings/*
设置)。如果为false
,则禁用所有GDScript警告。
bool debug/gdscript/warnings/exclude_addons
Default |
|
如果true
,则res://addons
文件夹中的脚本不会生成警告。
bool debug/gdscript/warnings/function_conflicts_constant
Default |
|
如果为true
,当函数被声明为与常量同名时,启用警告。
bool debug/gdscript/warnings/function_conflicts_variable
Default |
|
如果为true
, 当一个函数与一个变量同名声明时,启用警告。在未来的版本中,当GDScript支持第一类函数时,这将变成一个错误。
bool debug/gdscript/warnings/function_may_yield
Default |
|
如果为true
,则当分配给变量的函数可能产生并返回函数状态而不是值时,启用警告。
bool debug/gdscript/warnings/function_used_as_property
Default |
|
如果true
,则在使用函数时启用警告,就像它是属性一样。
bool debug/gdscript/warnings/incompatible_ternary
Default |
|
如果true
,则当三元运算符可能发出类型不兼容的值时,将启用警告。
bool debug/gdscript/warnings/integer_division
Default |
|
如果为true
,则在用一个整数除以另一个整数时启用警告(小数部分将被丢弃)。
bool debug/gdscript/warnings/narrowing_conversion
Default |
|
如果 为true
,则在将浮点值传递给需要整数的函数时启用警告(它将被转换并失去精度)。
bool debug/gdscript/warnings/property_used_as_function
Default |
|
如果true
,则在将属性当作函数使用时启用警告。
bool debug/gdscript/warnings/return_value_discarded
Default |
|
如果true
,则在不使用函数返回值(通过将其赋值给变量或将其用作函数参数)调用函数时启用警告。这样的返回值有时使用Error 枚举来表示可能的错误。
bool debug/gdscript/warnings/shadowed_variable
Default |
|
如果true
,则在定义局部或子类成员变量时启用警告,该局部或子类成员变量将在上层阴影变量(如成员变量)。
bool debug/gdscript/warnings/standalone_expression
Default |
|
如果true
,则在调用对周围代码没有影响的表达式时启用警告,例如将2 + 2
写成语句。
bool debug/gdscript/warnings/standalone_ternary
Default |
|
如果true
,则在调用对周围代码没有影响的三元表达式时启用警告,例如将42(如果激活else 0
)写入语句。
bool debug/gdscript/warnings/treat_warnings_as_errors
Default |
|
如果true
,所有警告将被报告为错误。
bool debug/gdscript/warnings/unassigned_variable
Default |
|
如果true
,则在使用以前没有赋值的变量时启用警告。
bool debug/gdscript/warnings/unassigned_variable_op_assign
Default |
|
如果true
,则在使用赋值操作符+=
(如果变量之前没有赋值)为变量赋值时启用警告。
bool debug/gdscript/warnings/unreachable_code
Default |
|
如果true
,则在检测到不可达的代码时启用警告(例如在始终执行的return
语句之后)。
bool debug/gdscript/warnings/unsafe_call_argument
Default |
|
如果true
,则在使用类型可能与期望的函数参数不兼容的表达式时启用警告。
bool debug/gdscript/warnings/unsafe_cast
Default |
|
如果true
,则在执行不安全的强制转换时启用警告。
bool debug/gdscript/warnings/unsafe_method_access
Default |
|
如果true
,则在调用类中不能保证在编译时存在的方法时启用警告。
bool debug/gdscript/warnings/unsafe_property_access
Default |
|
如果true
,则在访问类中不能保证在编译时存在的属性时启用警告。
bool debug/gdscript/warnings/unused_argument
Default |
|
如果true
,当一个函数参数未使用时,启用警告。
bool debug/gdscript/warnings/unused_class_variable
Default |
|
如果true
,当一个成员变量未使用时,启用警告。
bool debug/gdscript/warnings/unused_signal
Default |
|
如果true
,则在信号未使用时启用警告。
bool debug/gdscript/warnings/unused_variable
Default |
|
如果true
,则在局部变量未使用时启用警告。
bool debug/gdscript/warnings/variable_conflicts_function
Default |
|
如果 true
,则在声明与函数同名的变量时启用警告。当 GDScript 支持一流函数时,这将在未来版本中变成错误。
bool debug/gdscript/warnings/void_assignment
Default |
|
如果true
,则在将返回void
的函数的结果赋值给变量时启用警告。
String debug/settings/crash_handler/message
Default |
|
当引擎崩溃时,在回溯之前显示的消息。
int debug/settings/fps/force_fps
Default |
|
Maximum number of frames per second allowed. The actual number of frames per second may still be below this value if the game is lagging. See also physics/common/physics_fps.
If display/window/vsync/use_vsync is enabled, it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate.
This setting is therefore mostly relevant for lowering the maximum FPS below VSync, e.g. to perform non-real-time rendering of static frames, or test the project under lag conditions.
Note: This property is only read when the project starts. To change the rendering FPS cap at runtime, set Engine.target_fps instead.
int debug/settings/gdscript/max_call_stack
Default |
|
调试GDScript时允许的最大调用堆栈。
int debug/settings/profiler/max_functions
Default |
|
分析时每个帧允许的最大函数数量。
bool debug/settings/stdout/print_fps
Default |
|
每秒钟打印帧到标准输出。
bool debug/settings/stdout/verbose_stdout
Default |
|
运行时打印更多信息到标准输出。它显示诸如内存泄漏、哪些场景和资源正在加载等信息。
int debug/settings/visual_script/max_call_stack
Default |
|
最大的可视脚本调用堆栈,以避免无限递归。
Color debug/shapes/collision/contact_color
Default |
|
碰撞形状之间接触点的颜色,在调试菜单中启用“可见碰撞形状”时可见。
bool debug/shapes/collision/draw_2d_outlines
Default |
|
设置当调试菜单中的启用 "可见的碰撞形状" 时,2D物理是否会在游戏中显示碰撞轮廓。
int debug/shapes/collision/max_contacts_displayed
Default |
|
当在调试菜单中启用“可见碰撞形状”时,碰撞形状之间显示的最大接触点数。
Color debug/shapes/collision/shape_color
Default |
|
碰撞形状的颜色,当在调试菜单中启用“可见碰撞形状”时可见。
Default |
|
被禁用的导航几何图形的颜色,在调试菜单中启用“可见导航”时可见。
Default |
|
导航几何图形的颜色,在调试菜单中启用“可见导航”时可见。
String display/mouse_cursor/custom_image
Default |
|
鼠标光标的自定义图像(最大256×256)。
Vector2 display/mouse_cursor/custom_image_hotspot
Default |
|
自定义鼠标光标图像的热点。
Vector2 display/mouse_cursor/tooltip_position_offset
Default |
|
工具提示相对于鼠标光标热点的位置偏移量。
bool display/window/dpi/allow_hidpi
Default |
|
如果true
,允许在Windows、macOS和HTML5平台上显示HiDPI。这个设置对桌面Linux没有影响,因为它不支持DPI感知回退。
bool display/window/energy_saving/keep_screen_on
Default |
|
如果true
,则保持屏幕打开(即使在不活动的情况下),因此屏幕保护程序不会接管。适用于桌面和移动平台。
String display/window/handheld/orientation
Default |
|
在移动设备上使用的默认屏幕方向。
注意:设置为纵向时,此项目设置不会自动翻转项目分辨率的宽度和高度。相反,您必须相应地设置 display/window/size/width 和 display/window/size/height。
bool display/window/ios/hide_home_indicator
Default |
|
如果true
,主指示器将自动隐藏。这只会影响没有物理home键的iOS设备。
bool display/window/per_pixel_transparency/allowed
Default |
|
如果 true
,则允许窗口背景的逐像素透明度。这会影响性能,因此除非需要,否则将其保留为 false
。
有关更多详细信息,请参阅 OS.window_per_pixel_transparency_enabled。
注意: 此功能在 HTML5、Linux、macOS、Windows 和 Android 上实现。
bool display/window/per_pixel_transparency/enabled
Default |
|
启动时将窗口背景设置为透明。
有关更多详细信息,请参阅 OS.window_per_pixel_transparency_enabled。
注意: 此功能在 HTML5、Linux、macOS、Windows 和 Android 上实现。
bool display/window/size/always_on_top
Default |
|
强制主窗口始终在顶部。
注意: 此设置在 iOS、Android 和 HTML5 上被忽略。
bool display/window/size/borderless
Default |
|
强制主窗口无边框。
注意: 此设置在 iOS、Android 和 HTML5 上被忽略。
bool display/window/size/fullscreen
Default |
|
Sets the main window to full screen when the project starts. Note that this is not exclusive fullscreen. On Windows and Linux, a borderless window is used to emulate fullscreen. On macOS, a new desktop is used to display the running project.
Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports multiple resolutions when enabling fullscreen mode.
Note: This setting is ignored on iOS, Android, and HTML5.
int display/window/size/height
Default |
|
设置游戏的主视窗高度。在桌面平台上,这是默认的窗口大小。当启用拉伸模式设置时,也使用此参数作为参考。
bool display/window/size/resizable
Default |
|
允许窗口默认可调整大小。
注意: 这个设置在iOS和Android上将忽略。
int display/window/size/test_height
Default |
|
如果大于0,则在运行游戏时覆盖窗口高度。用于测试拉伸模式。
int display/window/size/test_width
Default |
|
如果大于0,则在运行游戏时覆盖窗口宽度。用于测试拉伸模式。
int display/window/size/width
Default |
|
设置游戏的主视窗宽度。在桌面平台上,这是默认的窗口大小。当启用拉伸模式设置时,也使用此参数作为参考。
String display/window/tablet_driver
指定要使用的平板驱动程序。如果为空,将使用默认驱动程序。
bool display/window/vsync/use_vsync
Default |
|
如果true
,则启用垂直同步。这消除了在移动场景中可能出现的撕裂,以较高的输入延迟和较低的帧率为代价。如果false
,垂直同步将被禁用,然而,许多平台仍将执行它(如手机平台和HTML5)。
bool display/window/vsync/vsync_via_compositor
Default |
|
如果Use Vsync
已启用,且true
,则在窗口模式下启用排字器时,可通过操作系统的窗口排字器实现垂直同步。这将防止在某些情况下卡顿。(Windows)。
注:这个选项是实验性的,旨在缓解一些用户的卡顿体验。然而,有些用户在使用它时体验到垂直同步帧率减半(例如从60 FPS降至30 FPS)。
String editor/main_run_args
Default |
|
运行项目时附加到 Godot 自己的命令行的命令行参数。这不会影响编辑器本身。
可以使用 %command%
占位符使另一个可执行文件运行 Godot。占位符将替换为 Godot 自己的命令行。程序特定的参数应该放在占位符之前,而 Godot 特定参数应该放在占位符之后。
例如,这可用于强制项目在 Linux 上的 NVIDIA Optimus 系统中的专用 GPU 上运行:
prime-run %command%
String editor/script_templates_search_path
Default |
|
对于项目特定的脚本模板的搜索路径。 Godot 将在编辑器的特定路径和此项目的路径中搜索。
PoolStringArray editor/search_in_file_extensions
Default |
|
脚本编辑器的“在文件中查找”特性中包含的基于文本的文件扩展名。你可以添加例如tscn
,如果你也想解析你的场景文件,特别是如果你使用的是在场景文件中序列化的内置脚本。
int gui/common/default_scroll_deadzone
Default |
|
ScrollContainer.scroll_deadzone,它将用于所有ScrollContainers,除非重写。
bool gui/common/swap_ok_cancel
如果true
,在Windows和UWP的对话框中交换确定和取消按钮,以遵循界面惯例。
int gui/common/text_edit_undo_stack_max_size
Default |
|
String gui/theme/custom
Default |
|
用于项目的自定义Theme资源文件的路径(theme
或通用tres
/res
扩展名)。
String gui/theme/custom_font
Default |
|
自定义Font资源的路径,用于项目的所有GUI元素的默认字体。
bool gui/theme/use_hidpi
Default |
|
如果true
,确保使用的主题将在HiDPI下工作。
int gui/timers/incremental_search_max_interval_msec
Default |
|
在Tree, ItemList等控件中为增量搜索设置计时器(以毫秒为单位)。
float gui/timers/text_edit_idle_detect_sec
Default |
|
检测TextEdit空闲的计时器(单位为秒)。
float gui/timers/tooltip_delay_sec
Default |
|
工具提示的默认延迟(以秒为单位)。
Dictionary input/ui_accept
默认用于确认焦点按钮、菜单或列表项,或验证输入的InputEventAction。
注意:默认的ui_*
动作不能被删除,因为它们是几个Control的内部逻辑所必需的。但是,可以修改分配给该操作的事件。
Dictionary input/ui_cancel
默认放弃一个模态或挂起的输入的InputEventAction。
注意:默认的ui_*
动作不能被删除,因为它们是几个Control的内部逻辑所必需的。但是,可以修改分配给该操作的事件。
Dictionary input/ui_down
默认在UI中向下移动的InputEventAction。
注意:默认的ui_*
动作不能被删除,因为它们是几个Control的内部逻辑所必需的。但是,可以修改分配给该操作的事件。
Dictionary input/ui_end
默认InputEventAction去Control的结束位置(例如ItemList或Tree中的最后一项),匹配典型桌面UI系统中@GlobalScope.KEY_END的行为。
注意:默认的ui_*
动作不能被删除,因为它们是几个Control的内部逻辑所必需的。但是,可以修改分配给该操作的事件。
Dictionary input/ui_focus_next
默认聚焦场景中的下一个Control的InputEventAction。焦点行为可以通过Control.focus_next配置。
注意:默认的ui_*
动作不能被删除,因为它们是几个Control的内部逻辑所必需的。但是,可以修改分配给该操作的事件。
Dictionary input/ui_focus_prev
默认聚焦场景中的前一个Control的InputEventAction。焦点行为可以通过Control.focus_previous配置。
注意:默认的ui_*
动作不能被删除,因为它们是几个Control的内部逻辑所必需的。但是,可以修改分配给该操作的事件。
Dictionary input/ui_home
默认的将进入Control的起始位置(例如ItemList或Tree中的第一个项目)时的InputEventAction,与典型的桌面UI系统中@GlobalScope.KEY_HOME的行为相匹配。
注意: 默认的ui_*
动作不能被删除,因为它们对于几个Control的内部逻辑是必要的。然而,分配给动作的事件可以被修改。
Dictionary input/ui_left
默认在UI中向左移动的InputEventAction。
注意:默认的ui_*
动作不能被删除,因为它们是几个Control的内部逻辑所必需的。但是,可以修改分配给该操作的事件。
Dictionary input/ui_page_down
默认的在Control(例如ItemList或Tree)中下拉页面的InputEventAction,与典型桌面UI系统中@GlobalScope.KEY_PAGEDOWN的行为相匹配。
注意:默认的ui_*
动作不能被删除,因为它们是几个Control的内部逻辑所必需的。但是,可以修改分配给该操作的事件。
Dictionary input/ui_page_up
默认在Control(例如ItemList或Tree)中上移页面的InputEventAction,与典型桌面UI系统中@GlobalScope.KEY_PAGEUP的行为相匹配。
注意:默认的ui_*
动作不能被删除,因为它们是几个Control的内部逻辑所必需的。但是,可以修改分配给该操作的事件。
Dictionary input/ui_right
默认在UI中右移的InputEventAction。
注意:默认的ui_*
动作不能被删除,因为它们是几个Control的内部逻辑所必需的。但是,可以修改分配给该操作的事件。
Dictionary input/ui_select
默认选择Control(例如ItemList或Tree)中的一个项目InputEventAction。
注意:默认的ui_*
动作不能被删除,因为它们是几个Control的内部逻辑所必需的。但是,可以修改分配给该操作的事件。
Dictionary input/ui_up
默认在UI中向上移动InputEventAction。
注意:默认的ui_*
动作不能被删除,因为它们是几个Control的内部逻辑所必需的。但是,可以修改分配给该操作的事件。
bool input_devices/buffering/agile_event_flushing
Default |
|
如果 true
,按键/触摸/操纵杆事件将在每个空闲帧和物理帧之前刷新。
如果 false
,此类事件将在引擎迭代之间每个空闲帧仅刷新一次。
启用此功能可以大大提高对输入的响应能力,特别是在需要每个可见(空闲)帧运行多个物理帧的设备中,因为它们无法以目标帧速率运行。
注: 目前仅在 Android 中实现。
bool input_devices/pointing/emulate_mouse_from_touch
Default |
|
如果true
,则在点击或滑动触摸屏时发送鼠标输入事件。
bool input_devices/pointing/emulate_touch_from_mouse
Default |
|
如果true
,则在点击或拖动鼠标时发送触摸输入事件。
float input_devices/pointing/ios/touch_delay
Default |
|
工具提示的默认延迟(以秒为单位)。
String layer_names/2d_physics/layer_1
Default |
|
2D物理层1的可选名称。
String layer_names/2d_physics/layer_10
Default |
|
2D物理层10的可选名称。
String layer_names/2d_physics/layer_11
Default |
|
2D物理层11的可选名称。
String layer_names/2d_physics/layer_12
Default |
|
2D物理层12的可选名称。
String layer_names/2d_physics/layer_13
Default |