ProjectSettings¶
Inherits: Object
Contains global variables accessible from everywhere.
Description¶
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.
Tutorials¶
""
Color( 0.14, 1 )
true
""
true
""
""
""
""
""
""
false
""
false
false
false
true
0
false
6900
""
-60.0
2.0
"res://default_bus_layout.tres"
"PulseAudio"
false
44100
15
50
0
-1
-1
3
false
27
false
true
true
true
true
true
true
true
true
true
true
true
true
true
true
true
true
false
true
true
true
false
false
false
false
true
false
true
true
true
true
"Please include this when reporting the bug on https://github.com/godotengine/godot/issues"
0
1024
16384
false
false
1024
Color( 1, 0.2, 0.1, 0.8 )
true
10000
Color( 0, 0.6, 0.7, 0.42 )
Color( 1, 0.7, 0.1, 0.4 )
Color( 0.1, 1, 0.7, 0.4 )
""
Vector2( 0, 0 )
Vector2( 10, 10 )
false
true
"landscape"
true
false
false
false
false
false
600
true
0
0
1024
""
true
false
"res://script_templates"
PoolStringArray( "gd", "shader" )
0
false
1024
""
""
false
2000
3
0.5
true
false
0.15
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
"en"
""
false
true
"user://logs/godot.log"
5
256
4096
60
2048
100
10
100
16
30
64
64
1024
64
1024
64
1024
64
1024
4
65536
""
0
0
4096
128
1.0
98
Vector2( 0, 1 )
0.1
512
"DEFAULT"
0.139626
2.0
1
0.5
true
0.1
9.8
Vector3( 0, -1, 0 )
0.1
true
"DEFAULT"
true
false
60
0.5
0
0
0
0
1
false
true
false
false
false
32
1.0
false
true
true
16384
rendering/batching/parameters/colored_vertex_format_threshold
0.25
4
16
false
100
512
64
256
1024
Color( 0.3, 1 )
""
false
false
4096
128
rendering/limits/buffers/canvas_polygon_index_buffer_size_kb
128
2048
32
65536
4096
1024
3600
true
false
"PowerVR,Mali,Adreno,Apple"
true
4096
2048
"GLES3"
false
4
0
false
false
false
2
rendering/quality/intended_usage/framebuffer_allocation.mobile
3
true
false
2048
8
true
false
128
true
rendering/quality/reflections/texture_array_reflections.mobile
false
false
true
false
true
false
true
512
1
2
3
4
4096
2048
1
0
false
true
0.0
true
false
1
1.0
true
false
1
false
false
true
false
true
100
Methods¶
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 ) |
Property Descriptions¶
String android/modules
Default |
|
Comma-separated list of custom Android modules (which must have been built in the Android export templates) using their Java package path, e.g. "org/godotengine/godot/MyCustomSingleton,com/example/foo/FrenchFriesFactory"
.
Note: Since Godot 3.2.2, the org/godotengine/godot/GodotPaymentV3
module was deprecated and replaced by the GodotPayment
plugin which should be enabled in the Android export preset under Plugins
section. The singleton to access in code was also renamed to GodotPayment
.
Color application/boot_splash/bg_color
Default |
|
Background color for the boot splash.
bool application/boot_splash/fullsize
Default |
|
If true
, scale the boot splash image to the full window length when 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.
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 |
|
This user directory is used for storing persistent data (user://
filesystem). If left empty, user://
resolves to a project-specific folder in Godot's own configuration folder (see OS.get_user_data_dir). If a custom directory name is defined, this name will be used instead and appended to the system-specific user data directory (same parent folder as the Godot configuration folder documented in OS.get_user_data_dir).
The application/config/use_custom_user_dir setting must be enabled for this to take effect.
String application/config/description
Default |
|
The project's description, displayed as a tooltip in the Project Manager when hovering the project.
String application/config/icon
Default |
|
Icon used for the project, set when project loads. Exporters will also use this icon when possible.
String application/config/macos_native_icon
Default |
|
Icon set in .icns
format used on macOS to set the game's icon. This is done automatically on start by calling 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 |
|
Specifies a file to override project settings. For example: user://custom_settings.cfg
. See "Overriding" in the ProjectSettings
class description at the top for more information.
Note: Regardless of this setting's value, res://override.cfg
will still be read to override the project settings.
bool application/config/use_custom_user_dir
Default |
|
If true
, the project will save user data to its own user directory (see application/config/custom_user_dir_name). This setting is only effective on desktop platforms. A name must be set in the application/config/custom_user_dir_name setting for this to take effect. If false
, the project will save user data to (OS user data directory)/Godot/app_userdata/(project name)
.
String application/config/windows_native_icon
Default |
|
Icon set in .ico
format used on Windows to set the game's icon. This is done automatically on start by calling OS.set_native_icon.
bool application/run/disable_stderr
Default |
|
If true
, disables printing to standard error in an exported build.
bool application/run/disable_stdout
Default |
|
If true
, disables printing to standard output in an exported build.
bool application/run/flush_stdout_on_print
Default |
|
If true
, flushes the standard output stream every time a line is printed. This affects both terminal logging and file logging.
When running a project, this setting must be enabled if you want logs to be collected by service managers such as systemd/journalctl. This setting is disabled by default on release builds, since flushing on every printed line will negatively affect performance if lots of lines are printed in a rapid succession. Also, if this setting is enabled, logged files will still be written successfully if the application crashes or is otherwise killed by the user (without being closed "normally").
Note: Regardless of this setting, the standard error stream (stderr
) is always flushed when a line is printed to it.
Changes to this setting will only be applied upon restarting the application.
bool application/run/flush_stdout_on_print.debug
Default |
|
Debug build override for application/run/flush_stdout_on_print, as performance is less important during debugging.
Changes to this setting will only be applied upon restarting the application.
int application/run/frame_delay_msec
Default |
|
Forces a delay between frames in the main loop (in milliseconds). This may be useful if you plan to disable vertical synchronization.
bool application/run/low_processor_mode
Default |
|
If true
, enables low-processor usage mode. This setting only works on desktop platforms. The screen is not redrawn if nothing changes visually. This is meant for writing applications and editors, but is pretty useless (and can hurt performance) in most games.
int application/run/low_processor_mode_sleep_usec
Default |
|
Amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage.
String application/run/main_scene
Default |
|
Path to the main scene file that will be loaded when the project runs.
float audio/channel_disable_threshold_db
Default |
|
Audio buses will disable automatically when sound goes below a given dB threshold for a given time. This saves CPU as effects assigned to that bus will no longer do any processing.
float audio/channel_disable_time
Default |
|
Audio buses will disable automatically when sound goes below a given dB threshold for a given time. This saves CPU as effects assigned to that bus will no longer do any processing.
String audio/default_bus_layout
Default |
|
Default AudioBusLayout resource file to use in the project, unless overridden by the scene.
String audio/driver
Default |
|
Specifies the audio driver to use. This setting is platform-dependent as each platform supports different audio drivers. If left empty, the default audio driver will be used.
bool audio/enable_audio_input
Default |
|
If true
, microphone input will be allowed. This requires appropriate permissions to be set when exporting to Android or iOS.
int audio/mix_rate
Default |
|
Mixing rate used for audio. In general, it's better to not touch this and leave it to the host operating system.
int audio/output_latency
Default |
|
Output latency in milliseconds for audio. Lower values will result in lower audio latency at the cost of increased CPU usage. Low values may result in audible cracking on slower hardware.
int audio/output_latency.web
Default |
|
Safer override for audio/output_latency in the Web platform, to avoid audio issues especially on mobile devices.
int audio/video_delay_compensation_ms
Default |
|
Setting to hardcode audio delay when playing video. Best to leave this untouched unless you know what you are doing.
int compression/formats/gzip/compression_level
Default |
|
The default compression level for gzip. Affects compressed scenes and resources. Higher levels result in smaller files at the cost of compression speed. Decompression speed is mostly unaffected by the compression level. -1
uses the default gzip compression level, which is identical to 6
but could change in the future due to underlying zlib updates.
int compression/formats/zlib/compression_level
Default |
|
The default compression level for Zlib. Affects compressed scenes and resources. Higher levels result in smaller files at the cost of compression speed. Decompression speed is mostly unaffected by the compression level. -1
uses the default gzip compression level, which is identical to 6
but could change in the future due to underlying zlib updates.
int compression/formats/zstd/compression_level
Default |
|
The default compression level for Zstandard. Affects compressed scenes and resources. Higher levels result in smaller files at the cost of compression speed. Decompression speed is mostly unaffected by the compression level.
bool compression/formats/zstd/long_distance_matching
Default |
|
Enables long-distance matching in Zstandard.
int compression/formats/zstd/window_log_size
Default |
|
Largest size limit (in power of 2) allowed when compressing using long-distance matching with Zstandard. Higher values can result in better compression, but will require more memory when compressing and decompressing.
bool debug/gdscript/completion/autocomplete_setters_and_getters
Default |
|
If true
, displays getters and setters in autocompletion results in the script editor. This setting is meant to be used when porting old projects (Godot 2), as using member variables is the preferred style from Godot 3 onwards.
bool debug/gdscript/warnings/constant_used_as_function
Default |
|
If true
, enables warnings when a constant is used as a function.
bool debug/gdscript/warnings/deprecated_keyword
Default |
|
If true
, enables warnings when deprecated keywords such as slave
are used.
bool debug/gdscript/warnings/enable
Default |
|
If true
, enables specific GDScript warnings (see debug/gdscript/warnings/*
settings). If false
, disables all GDScript warnings.
bool debug/gdscript/warnings/exclude_addons
Default |
|
If true
, scripts in the res://addons
folder will not generate warnings.
bool debug/gdscript/warnings/function_conflicts_constant
Default |
|
If true
, enables warnings when a function is declared with the same name as a constant.
bool debug/gdscript/warnings/function_conflicts_variable
Default |
|
If true
, enables warnings when a function is declared with the same name as a variable. This will turn into an error in a future version when first-class functions become supported in GDScript.
bool debug/gdscript/warnings/function_may_yield
Default |
|
If true
, enables warnings when a function assigned to a variable may yield and return a function state instead of a value.
bool debug/gdscript/warnings/function_used_as_property
Default |
|
If true
, enables warnings when using a function as if it was a property.
bool debug/gdscript/warnings/incompatible_ternary
Default |
|
If true
, enables warnings when a ternary operator may emit values with incompatible types.
bool debug/gdscript/warnings/integer_division
Default |
|
If true
, enables warnings when dividing an integer by another integer (the decimal part will be discarded).
bool debug/gdscript/warnings/narrowing_conversion
Default |
|
If true
, enables warnings when passing a floating-point value to a function that expects an integer (it will be converted and lose precision).
bool debug/gdscript/warnings/property_used_as_function
Default |
|
If true
, enables warnings when using a property as if it was a function.
bool debug/gdscript/warnings/return_value_discarded
Default |
|
If true
, enables warnings when calling a function without using its return value (by assigning it to a variable or using it as a function argument). Such return values are sometimes used to denote possible errors using the Error enum.
bool debug/gdscript/warnings/shadowed_variable
Default |
|
If true
, enables warnings when defining a local or subclass member variable that would shadow a variable at an upper level (such as a member variable).
bool debug/gdscript/warnings/standalone_expression
Default |
|
If true
, enables warnings when calling an expression that has no effect on the surrounding code, such as writing 2 + 2
as a statement.
bool debug/gdscript/warnings/standalone_ternary
Default |
|
If true
, enables warnings when calling a ternary expression that has no effect on the surrounding code, such as writing 42 if active else 0
as a statement.
bool debug/gdscript/warnings/treat_warnings_as_errors
Default |
|
If true
, all warnings will be reported as if they were errors.
bool debug/gdscript/warnings/unassigned_variable
Default |
|
If true
, enables warnings when using a variable that wasn't previously assigned.
bool debug/gdscript/warnings/unassigned_variable_op_assign
Default |
|
If true
, enables warnings when assigning a variable using an assignment operator like +=
if the variable wasn't previously assigned.
bool debug/gdscript/warnings/unreachable_code
Default |
|
If true
, enables warnings when unreachable code is detected (such as after a return
statement that will always be executed).
bool debug/gdscript/warnings/unsafe_call_argument
Default |
|
If true
, enables warnings when using an expression whose type may not be compatible with the function parameter expected.
bool debug/gdscript/warnings/unsafe_cast
Default |
|
If true
, enables warnings when performing an unsafe cast.
bool debug/gdscript/warnings/unsafe_method_access
Default |
|
If true
, enables warnings when calling a method whose presence is not guaranteed at compile-time in the class.
bool debug/gdscript/warnings/unsafe_property_access
Default |
|
If true
, enables warnings when accessing a property whose presence is not guaranteed at compile-time in the class.
bool debug/gdscript/warnings/unused_argument
Default |
|
If true
, enables warnings when a function parameter is unused.
bool debug/gdscript/warnings/unused_class_variable
Default |
|
If true
, enables warnings when a member variable is unused.
bool debug/gdscript/warnings/unused_signal
Default |
|
If true
, enables warnings when a signal is unused.
bool debug/gdscript/warnings/unused_variable
Default |
|
If true
, enables warnings when a local variable is unused.
bool debug/gdscript/warnings/variable_conflicts_function
Default |
|
If true
, enables warnings when a variable is declared with the same name as a function. This will turn into an error in a future version when first-class functions become supported in GDScript.
bool debug/gdscript/warnings/void_assignment
Default |
|
If true
, enables warnings when assigning the result of a function that returns void
to a variable.
String debug/settings/crash_handler/message
Default |
|
Message to be displayed before the backtrace when the engine crashes.
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.
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.
int debug/settings/gdscript/max_call_stack
Default |
|
Maximum call stack allowed for debugging GDScript.
int debug/settings/profiler/max_functions
Default |
|
Maximum amount of functions per frame allowed when profiling.
bool debug/settings/stdout/print_fps
Default |
|
Print frames per second to standard output every second.
bool debug/settings/stdout/verbose_stdout
Default |
|
Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc.
int debug/settings/visual_script/max_call_stack
Default |
|
Maximum call stack in visual scripting, to avoid infinite recursion.
Color debug/shapes/collision/contact_color
Default |
|
Color of the contact points between collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu.
bool debug/shapes/collision/draw_2d_outlines
Default |
|
Sets whether 2D physics will display collision outlines in game when "Visible Collision Shapes" is enabled in the Debug menu.
int debug/shapes/collision/max_contacts_displayed
Default |
|
Maximum number of contact points between collision shapes to display when "Visible Collision Shapes" is enabled in the Debug menu.
Color debug/shapes/collision/shape_color
Default |
|
Color of the collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu.
Default |
|
Color of the disabled navigation geometry, visible when "Visible Navigation" is enabled in the Debug menu.
Default |
|
Color of the navigation geometry, visible when "Visible Navigation" is enabled in the Debug menu.
String display/mouse_cursor/custom_image
Default |
|
Custom image for the mouse cursor (limited to 256×256).
Vector2 display/mouse_cursor/custom_image_hotspot
Default |
|
Hotspot for the custom mouse cursor image.
Vector2 display/mouse_cursor/tooltip_position_offset
Default |
|
Position offset for tooltips, relative to the mouse cursor's hotspot.
bool display/window/dpi/allow_hidpi
Default |
|
If true
, allows HiDPI display on Windows, macOS, and the HTML5 platform. This setting has no effect on desktop Linux, as DPI-awareness fallbacks are not supported there.
bool display/window/energy_saving/keep_screen_on
Default |
|
If true
, keeps the screen on (even in case of inactivity), so the screensaver does not take over. Works on desktop and mobile platforms.
String display/window/handheld/orientation
Default |
|
The default screen orientation to use on mobile devices.
Note: When set to a portrait orientation, this project setting does not flip the project resolution's width and height automatically. Instead, you have to set display/window/size/width and display/window/size/height accordingly.
bool display/window/ios/hide_home_indicator
Default |
|
If true
, the home indicator is hidden automatically. This only affects iOS devices without a physical home button.
bool display/window/per_pixel_transparency/allowed
Default |
|
If true
, allows per-pixel transparency in a desktop window. This affects performance, so leave it on false
unless you need it.
bool display/window/per_pixel_transparency/enabled
Default |
|
Sets the window background to transparent when it starts.
bool display/window/size/always_on_top
Default |
|
Forces the main window to be always on top.
Note: This setting is ignored on iOS, Android, and HTML5.
bool display/window/size/borderless
Default |
|
Forces the main window to be borderless.
Note: This setting is ignored on iOS, Android, and 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 |
|
Sets the game's main viewport height. On desktop platforms, this is the default window size. Stretch mode settings also use this as a reference when enabled.
bool display/window/size/resizable
Default |
|
Allows the window to be resizable by default.
Note: This setting is ignored on iOS and Android.
int display/window/size/test_height
Default |
|
If greater than zero, overrides the window height when running the game. Useful for testing stretch modes.
int display/window/size/test_width
Default |
|
If greater than zero, overrides the window width when running the game. Useful for testing stretch modes.
int display/window/size/width
Default |
|
Sets the game's main viewport width. On desktop platforms, this is the default window size. Stretch mode settings also use this as a reference when enabled.
String display/window/tablet_driver
Default |
|
Specifies the tablet driver to use. If left empty, the default driver will be used.
bool display/window/vsync/use_vsync
Default |
|
If true
, enables vertical synchronization. This eliminates tearing that may appear in moving scenes, at the cost of higher input latency and stuttering at lower framerates. If false
, vertical synchronization will be disabled, however, many platforms will enforce it regardless (such as mobile platforms and HTML5).
bool display/window/vsync/vsync_via_compositor
Default |
|
If Use Vsync
is enabled and this setting is true
, enables vertical synchronization via the operating system's window compositor when in windowed mode and the compositor is enabled. This will prevent stutter in certain situations. (Windows only.)
Note: This option is experimental and meant to alleviate stutter experienced by some users. However, some users have experienced a Vsync framerate halving (e.g. from 60 FPS to 30 FPS) when using it.
String editor/script_templates_search_path
Default |
|
Search path for project-specific script templates. Godot will search for script templates both in the editor-specific path and in this project-specific path.
PoolStringArray editor/search_in_file_extensions
Default |
|
Text-based file extensions to include in the script editor's "Find in Files" feature. You can add e.g. tscn
if you wish to also parse your scene files, especially if you use built-in scripts which are serialized in the scene files.
int gui/common/default_scroll_deadzone
Default |
|
Default value for ScrollContainer.scroll_deadzone, which will be used for all ScrollContainers unless overridden.
bool gui/common/swap_ok_cancel
Default |
|
If true
, swaps OK and Cancel buttons in dialogs on Windows and UWP to follow interface conventions.
int gui/common/text_edit_undo_stack_max_size
Default |
|
String gui/theme/custom
Default |
|
Path to a custom Theme resource file to use for the project (theme
or generic tres
/res
extension).
String gui/theme/custom_font
Default |
|
Path to a custom Font resource to use as default for all GUI elements of the project.
bool gui/theme/use_hidpi
Default |
|
If true
, makes sure the theme used works with HiDPI.
int gui/timers/incremental_search_max_interval_msec
Default |
|
Timer setting for incremental search in Tree, ItemList, etc. controls (in milliseconds).
float gui/timers/text_edit_idle_detect_sec
Default |
|
Timer for detecting idle in TextEdit (in seconds).
float gui/timers/tooltip_delay_sec
Default |
|
Default delay for tooltips (in seconds).
Dictionary input/ui_accept
Default InputEventAction to confirm a focused button, menu or list item, or validate input.
Note: Default ui_*
actions cannot be removed as they are necessary for the internal logic of several Controls. The events assigned to the action can however be modified.
Dictionary input/ui_cancel
Default InputEventAction to discard a modal or pending input.
Note: Default ui_*
actions cannot be removed as they are necessary for the internal logic of several Controls. The events assigned to the action can however be modified.
Dictionary input/ui_down
Default InputEventAction to move down in the UI.
Note: Default ui_*
actions cannot be removed as they are necessary for the internal logic of several Controls. The events assigned to the action can however be modified.
Dictionary input/ui_end
Default InputEventAction to go to the end position of a Control (e.g. last item in an ItemList or a Tree), matching the behavior of @GlobalScope.KEY_END on typical desktop UI systems.
Note: Default ui_*
actions cannot be removed as they are necessary for the internal logic of several Controls. The events assigned to the action can however be modified.
Dictionary input/ui_focus_next
<Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!
Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant