Contains global variables accessible from everywhere.
Contains global variables accessible from everywhere. Use [method get_setting], [method set_setting] or [method has_setting] to access them. Variables stored in [code]project.godot[/code] 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, [code]"application/config/name"[/code] for the project name. Category and property names can be viewed in the Project Settings dialog.
[b]Overriding:[/b] Any project setting can be overridden by creating a file named [code]override.cfg[/code] 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.
Adds a custom property info to a property. The dictionary must contain:
- [code]name[/code]: [String] (the property's name)
- [code]type[/code]: [int] (see [enum Variant.Type])
- optionally [code]hint[/code]: [int] (see [enum PropertyHint]) and [code]hint_string[/code]: [String]
[b]Example:[/b]
[codeblock]
ProjectSettings.set("category/property_name", 0)
var property_info = {
"name": "category/property_name",
"type": TYPE_INT,
"hint": PROPERTY_HINT_ENUM,
"hint_string": "one,two,three"
}
ProjectSettings.add_property_info(property_info)
[/codeblock]
Clears the whole configuration (not recommended, may break things).
Returns the order of a configuration value (influences when saved to the config file).
Returns the value of a setting.
[b]Example:[/b]
[codeblock]
print(ProjectSettings.get_setting("application/config/name"))
[/codeblock]
Converts a localized path ([code]res://[/code]) to a full native OS path.
Returns [code]true[/code] if a configuration value is present.
Loads the contents of the .pck or .zip file specified by [code]pack[/code] into the resource filesystem ([code]res://[/code]). Returns [code]true[/code] on success.
[b]Note:[/b] If a file from [code]pack[/code] shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from [code]pack[/code] unless [code]replace_files[/code] is set to [code]false[/code].
[b]Note:[/b] The optional [code]offset[/code] parameter can be used to specify the offset in bytes to the start of the resource pack. This is only supported for .pck files.
Convert a path to a localized path ([code]res://[/code] path).
Returns [code]true[/code] if the specified property exists and its initial value differs from the current value.
Returns the specified property's initial value. Returns [code]null[/code] if the property does not exist.
Saves the configuration to the [code]project.godot[/code] file.
Saves the configuration to a custom file. The file extension must be [code].godot[/code] (to save in text-based [ConfigFile] format) or [code].binary[/code] (to save in binary format).
Sets the specified property's initial value. This is the value the property reverts to.
Sets the order of a configuration value (influences when saved to the config file).
Sets the value of a setting.
[b]Example:[/b]
[codeblock]
ProjectSettings.set_setting("application/config/name", "Example")
[/codeblock]
Comma-separated list of custom Android modules (which must have been built in the Android export templates) using their Java package path, e.g. [code]"org/godotengine/godot/MyCustomSingleton,com/example/foo/FrenchFriesFactory"[/code].
[b]Note:[/b] Since Godot 3.2.2, the [code]org/godotengine/godot/GodotPaymentV3[/code] module was deprecated and replaced by the [code]GodotPayment[/code] plugin which should be enabled in the Android export preset under [code]Plugins[/code] section. The singleton to access in code was also renamed to [code]GodotPayment[/code].
Background color for the boot splash.
If [code]true[/code], scale the boot splash image to the full window length when engine starts. If [code]false[/code], the engine will leave it at the default pixel size.
Path to an image used as the boot splash.
If [code]true[/code], applies linear filtering when scaling the image (recommended for high resolution artwork). If [code]false[/code], uses nearest-neighbor interpolation (recommended for pixel art).
This user directory is used for storing persistent data ([code]user://[/code] filesystem). If left empty, [code]user://[/code] resolves to a project-specific folder in Godot's own configuration folder (see [method 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 [method OS.get_user_data_dir]).
The [member application/config/use_custom_user_dir] setting must be enabled for this to take effect.
The project's description, displayed as a tooltip in the Project Manager when hovering the project.
Icon used for the project, set when project loads. Exporters will also use this icon when possible.
Icon set in [code].icns[/code] format used on macOS to set the game's icon. This is done automatically on start by calling [method OS.set_native_icon].
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.
[b]Note:[/b] Changing this value will also change the user data folder's path if [member application/config/use_custom_user_dir] is [code]false[/code]. After renaming the project, you will no longer be able to access existing data in [code]user://[/code] unless you rename the old folder to match the new project name. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]Data paths[/url] in the documentation for more information.
Specifies a file to override project settings. For example: [code]user://custom_settings.cfg[/code].
[b]Note:[/b] Regardless of this setting's value, [code]res://override.cfg[/code] will still be read to override the project settings (see this class' description at the top).
If [code]true[/code], the project will save user data to its own user directory (see [member application/config/custom_user_dir_name]). This setting is only effective on desktop platforms. A name must be set in the [member application/config/custom_user_dir_name] setting for this to take effect. If [code]false[/code], the project will save user data to [code](OS user data directory)/Godot/app_userdata/(project name)[/code].
Icon set in [code].ico[/code] format used on Windows to set the game's icon. This is done automatically on start by calling [method OS.set_native_icon].
If [code]true[/code], disables printing to standard error in an exported build.
If [code]true[/code], disables printing to standard output in an exported build.
Forces a delay between frames in the main loop (in milliseconds). This may be useful if you plan to disable vertical synchronization.
If [code]true[/code], 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.
Amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage.
Path to the main scene file that will be loaded when the project runs.
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.
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.
Default [AudioBusLayout] resource file to use in the project, unless overridden by the scene.
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.
If [code]true[/code], microphone input will be allowed. This requires appropriate permissions to be set when exporting to Android or iOS.
Mixing rate used for audio. In general, it's better to not touch this and leave it to the host operating system.
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.
Safer override for [member audio/output_latency] in the Web platform, to avoid audio issues especially on mobile devices.
Setting to hardcode audio delay when playing video. Best to leave this untouched unless you know what you are doing.
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. [code]-1[/code] uses the default gzip compression level, which is identical to [code]6[/code] but could change in the future due to underlying zlib updates.
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. [code]-1[/code] uses the default gzip compression level, which is identical to [code]6[/code] but could change in the future due to underlying zlib updates.
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.
Enables [url=https://github.com/facebook/zstd/releases/tag/v1.3.2]long-distance matching[/url] in Zstandard.
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.
If [code]true[/code], 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.
If [code]true[/code], enables warnings when a constant is used as a function.
If [code]true[/code], enables warnings when deprecated keywords such as [code]slave[/code] are used.
If [code]true[/code], enables specific GDScript warnings (see [code]debug/gdscript/warnings/*[/code] settings). If [code]false[/code], disables all GDScript warnings.
If [code]true[/code], scripts in the [code]res://addons[/code] folder will not generate warnings.
If [code]true[/code], enables warnings when a function is declared with the same name as a constant.
If [code]true[/code], 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.
If [code]true[/code], enables warnings when a function assigned to a variable may yield and return a function state instead of a value.
If [code]true[/code], enables warnings when using a function as if it was a property.
If [code]true[/code], enables warnings when a ternary operator may emit values with incompatible types.
If [code]true[/code], enables warnings when dividing an integer by another integer (the decimal part will be discarded).
If [code]true[/code], enables warnings when passing a floating-point value to a function that expects an integer (it will be converted and lose precision).
If [code]true[/code], enables warnings when using a property as if it was a function.
If [code]true[/code], 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 [enum Error] enum.
If [code]true[/code], enables warnings when defining a local or subclass member variable that would shadow a variable at an upper level (such as a member variable).
If [code]true[/code], enables warnings when calling an expression that has no effect on the surrounding code, such as writing [code]2 + 2[/code] as a statement.
If [code]true[/code], enables warnings when calling a ternary expression that has no effect on the surrounding code, such as writing [code]42 if active else 0[/code] as a statement.
If [code]true[/code], all warnings will be reported as if they were errors.
If [code]true[/code], enables warnings when using a variable that wasn't previously assigned.
If [code]true[/code], enables warnings when assigning a variable using an assignment operator like [code]+=[/code] if the variable wasn't previously assigned.
If [code]true[/code], enables warnings when unreachable code is detected (such as after a [code]return[/code] statement that will always be executed).
If [code]true[/code], enables warnings when using an expression whose type may not be compatible with the function parameter expected.
If [code]true[/code], enables warnings when performing an unsafe cast.
If [code]true[/code], enables warnings when calling a method whose presence is not guaranteed at compile-time in the class.
If [code]true[/code], enables warnings when accessing a property whose presence is not guaranteed at compile-time in the class.
If [code]true[/code], enables warnings when a function parameter is unused.
If [code]true[/code], enables warnings when a member variable is unused.
If [code]true[/code], enables warnings when a signal is unused.
If [code]true[/code], enables warnings when a local variable is unused.
If [code]true[/code], 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.
If [code]true[/code], enables warnings when assigning the result of a function that returns [code]void[/code] to a variable.
Message to be displayed before the backtrace when the engine crashes.
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 [member 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.
Maximum call stack allowed for debugging GDScript.
Maximum amount of functions per frame allowed when profiling.
Print frames per second to standard output every second.
Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc.
Maximum call stack in visual scripting, to avoid infinite recursion.
Color of the contact points between collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu.
Maximum number of contact points between collision shapes to display when "Visible Collision Shapes" is enabled in the Debug menu.
Color of the collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu.
Color of the disabled navigation geometry, visible when "Visible Navigation" is enabled in the Debug menu.
Color of the navigation geometry, visible when "Visible Navigation" is enabled in the Debug menu.
Custom image for the mouse cursor (limited to 256×256).
Hotspot for the custom mouse cursor image.
Position offset for tooltips, relative to the mouse cursor's hotspot.
If [code]true[/code], allows HiDPI display on Windows and macOS. This setting has no effect on desktop Linux, as DPI-awareness fallbacks are not supported there.
If [code]true[/code], keeps the screen on (even in case of inactivity), so the screensaver does not take over. Works on desktop and mobile platforms.
Default orientation on mobile devices.
If [code]true[/code], the home indicator is hidden automatically. This only affects iOS devices without a physical home button.
If [code]true[/code], allows per-pixel transparency in a desktop window. This affects performance, so leave it on [code]false[/code] unless you need it.
Sets the window background to transparent when it starts.
Force the window to be always on top.
Force the window to be borderless.
Sets the window to full screen when it starts.
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.
Allows the window to be resizable by default.
If greater than zero, overrides the window height when running the game. Useful for testing stretch modes.
If greater than zero, overrides the window width when running the game. Useful for testing stretch modes.
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.
Specifies the tablet driver to use. If left empty, the default driver will be used.
If [code]true[/code], 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 [code]false[/code], vertical synchronization will be disabled, however, many platforms will enforce it regardless (such as mobile platforms and HTML5).
If [code]Use Vsync[/code] is enabled and this setting is [code]true[/code], 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.)
[b]Note:[/b] 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.
Search path for project-specific script templates. Script templates will be search both in the editor-specific path and in this project-specific path.
Text-based file extensions to include in the script editor's "Find in Files" feature. You can add e.g. [code]tscn[/code] if you wish to also parse your scene files, especially if you use built-in scripts which are serialized in the scene files.
Default value for [member ScrollContainer.scroll_deadzone], which will be used for all [ScrollContainer]s unless overridden.
If [code]true[/code], swaps OK and Cancel buttons in dialogs on Windows and UWP to follow interface conventions.
Path to a custom [Theme] resource file to use for the project ([code]theme[/code] or generic [code]tres[/code]/[code]res[/code] extension).
Path to a custom [Font] resource to use as default for all GUI elements of the project.
If [code]true[/code], makes sure the theme used works with HiDPI.
Timer setting for incremental search in [Tree], [ItemList], etc. controls (in milliseconds).
Timer for detecting idle in [TextEdit] (in seconds).
Default delay for tooltips (in seconds).
Default [InputEventAction] to confirm a focused button, menu or list item, or validate input.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
Default [InputEventAction] to discard a modal or pending input.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
Default [InputEventAction] to move down in the UI.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
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 [constant KEY_END] on typical desktop UI systems.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
Default [InputEventAction] to focus the next [Control] in the scene. The focus behavior can be configured via [member Control.focus_next].
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
Default [InputEventAction] to focus the previous [Control] in the scene. The focus behavior can be configured via [member Control.focus_previous].
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
Default [InputEventAction] to go to the start position of a [Control] (e.g. first item in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_HOME] on typical desktop UI systems.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
Default [InputEventAction] to move left in the UI.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
Default [InputEventAction] to go down a page in a [Control] (e.g. in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_PAGEDOWN] on typical desktop UI systems.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
Default [InputEventAction] to go up a page in a [Control] (e.g. in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_PAGEUP] on typical desktop UI systems.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
Default [InputEventAction] to move right in the UI.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
Default [InputEventAction] to select an item in a [Control] (e.g. in an [ItemList] or a [Tree]).
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
Default [InputEventAction] to move up in the UI.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
If [code]true[/code], sends mouse input events when tapping or swiping on the touchscreen.
If [code]true[/code], sends touch input events when clicking or dragging the mouse.
Optional name for the 2D physics layer 1.
Optional name for the 2D physics layer 10.
Optional name for the 2D physics layer 11.
Optional name for the 2D physics layer 12.
Optional name for the 2D physics layer 13.
Optional name for the 2D physics layer 14.
Optional name for the 2D physics layer 15.
Optional name for the 2D physics layer 16.
Optional name for the 2D physics layer 17.
Optional name for the 2D physics layer 18.
Optional name for the 2D physics layer 19.
Optional name for the 2D physics layer 2.
Optional name for the 2D physics layer 20.
Optional name for the 2D physics layer 3.
Optional name for the 2D physics layer 4.
Optional name for the 2D physics layer 5.
Optional name for the 2D physics layer 6.
Optional name for the 2D physics layer 7.
Optional name for the 2D physics layer 8.
Optional name for the 2D physics layer 9.
Optional name for the 2D render layer 1.
Optional name for the 2D render layer 10.
Optional name for the 2D render layer 11.
Optional name for the 2D render layer 12.
Optional name for the 2D render layer 13.
Optional name for the 2D render layer 14.
Optional name for the 2D render layer 15.
Optional name for the 2D render layer 16.
Optional name for the 2D render layer 17.
Optional name for the 2D render layer 18.
Optional name for the 2D render layer 19.
Optional name for the 2D render layer 2.
Optional name for the 2D render layer 20.
Optional name for the 2D render layer 3.
Optional name for the 2D render layer 4.
Optional name for the 2D render layer 5.
Optional name for the 2D render layer 6.
Optional name for the 2D render layer 7.
Optional name for the 2D render layer 8.
Optional name for the 2D render layer 9.
Optional name for the 3D physics layer 1.
Optional name for the 3D physics layer 10.
Optional name for the 3D physics layer 11.
Optional name for the 3D physics layer 12.
Optional name for the 3D physics layer 13.
Optional name for the 3D physics layer 14.
Optional name for the 3D physics layer 15.
Optional name for the 3D physics layer 16.
Optional name for the 3D physics layer 17.
Optional name for the 3D physics layer 18.
Optional name for the 3D physics layer 19.
Optional name for the 3D physics layer 2.
Optional name for the 3D physics layer 20.
Optional name for the 3D physics layer 3.
Optional name for the 3D physics layer 4.
Optional name for the 3D physics layer 5.
Optional name for the 3D physics layer 6.
Optional name for the 3D physics layer 7.
Optional name for the 3D physics layer 8.
Optional name for the 3D physics layer 9.
Optional name for the 3D render layer 1.
Optional name for the 3D render layer 10.
Optional name for the 3D render layer 11.
Optional name for the 3D render layer 12.
Optional name for the 3D render layer 13.
Optional name for the 3D render layer 14
Optional name for the 3D render layer 15.
Optional name for the 3D render layer 16.
Optional name for the 3D render layer 17.
Optional name for the 3D render layer 18.
Optional name for the 3D render layer 19.
Optional name for the 3D render layer 2.
Optional name for the 3D render layer 20.
Optional name for the 3D render layer 3.
Optional name for the 3D render layer 4.
Optional name for the 3D render layer 5.
Optional name for the 3D render layer 6.
Optional name for the 3D render layer 7.
Optional name for the 3D render layer 8.
Optional name for the 3D render layer 9.
The locale to fall back to if a translation isn't available in a given language. If left empty, [code]en[/code] (English) will be used.
If non-empty, this locale will be used when running the project from the editor.
If [code]true[/code], logs all output to files.
Path to logs within the project. Using an [code]user://[/code] path is recommended.
Specifies the maximum amount of log files allowed (used for rotation).
Godot uses a message queue to defer some function calls. If you run out of space on it (you will see an error), you can increase the size here.
This is used by servers when used in multi-threading mode (servers and visual). RIDs are preallocated to avoid stalling the server requesting them on threads. If servers get stalled too often when loading resources in a thread, increase this number.
Maximum amount of characters allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection.
Maximum number of errors allowed to be sent as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection.
Maximum amount of messages allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection.
Maximum number of warnings allowed to be sent as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection.
Default size of packet peer stream for deserializing Godot data. Over this size, data is dropped.
Timeout (in seconds) for connection attempts using TCP.
Maximum size (in kiB) for the [WebRTCDataChannel] input buffer.
Maximum size (in kiB) for the [WebSocketClient] input buffer.
Maximum number of concurrent input packets for [WebSocketClient].
Maximum size (in kiB) for the [WebSocketClient] output buffer.
Maximum number of concurrent output packets for [WebSocketClient].
Maximum size (in kiB) for the [WebSocketServer] input buffer.
Maximum number of concurrent input packets for [WebSocketServer].
Maximum size (in kiB) for the [WebSocketServer] output buffer.
Maximum number of concurrent output packets for [WebSocketServer].
Amount of read ahead used by remote filesystem. Higher values decrease the effects of latency at the cost of higher bandwidth usage.
Page size used by remote filesystem (in bytes).
The CA certificates bundle to use for SSL connections. If this is set to a non-empty value, this will [i]override[/i] Godot's default [url=https://github.com/godotengine/godot/blob/master/thirdparty/certs/ca-certificates.crt]Mozilla certificate bundle[/url]. If left empty, the default certificate bundle will be used.
If in doubt, leave this setting empty.
When creating node names automatically, set the type of casing in this project. This is mostly an editor setting.
What to use to separate node name from number. This is mostly an editor setting.
Size of the hash table used for the broad-phase 2D hash grid algorithm.
Cell size used for the broad-phase 2D hash grid algorithm (in pixels).
The default angular damp in 2D.
The default gravity strength in 2D.
[b]Note:[/b] This property is only read when the project starts. To change the default gravity at runtime, use the following code sample:
[codeblock]
# Set the default gravity strength to 98.
Physics2DServer.area_set_param(get_viewport().find_world_2d().get_space(), Physics2DServer.AREA_PARAM_GRAVITY, 98)
[/codeblock]
The default gravity direction in 2D.
[b]Note:[/b] This property is only read when the project starts. To change the default gravity vector at runtime, use the following code sample:
[codeblock]
# Set the default gravity direction to `Vector2(0, 1)`.
Physics2DServer.area_set_param(get_viewport().find_world_2d().get_space(), Physics2DServer.AREA_PARAM_GRAVITY_VECTOR, Vector2(0, 1))
[/codeblock]
The default linear damp in 2D.
Threshold defining the surface size that constitutes a large object with regard to cells in the broad-phase 2D hash grid algorithm.
Sets which physics engine to use for 2D physics.
"DEFAULT" and "GodotPhysics" are the same, as there is currently no alternative 2D physics server implemented.
Threshold angular velocity under which a 2D physics body will be considered inactive. See [constant Physics2DServer.SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD].
Threshold linear velocity under which a 2D physics body will be considered inactive. See [constant Physics2DServer.SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD].
Sets whether physics is run on the main thread or a separate one. Running the server on a thread increases performance, but restricts API access to only physics process.
[b]Warning:[/b] As of Godot 3.2, there are mixed reports about the use of a Multi-Threaded thread model for physics. Be sure to assess whether it does give you extra performance and no regressions when using it.
Time (in seconds) of inactivity before which a 2D physics body will put to sleep. See [constant Physics2DServer.SPACE_PARAM_BODY_TIME_TO_SLEEP].
Sets whether the 3D physics world will be created with support for [SoftBody] physics. Only applies to the Bullet physics engine.
The default angular damp in 3D.
The default gravity strength in 3D.
[b]Note:[/b] This property is only read when the project starts. To change the default gravity at runtime, use the following code sample:
[codeblock]
# Set the default gravity strength to 9.8.
PhysicsServer.area_set_param(get_viewport().find_world().get_space(), PhysicsServer.AREA_PARAM_GRAVITY, 9.8)
[/codeblock]
The default gravity direction in 3D.
[b]Note:[/b] This property is only read when the project starts. To change the default gravity vector at runtime, use the following code sample:
[codeblock]
# Set the default gravity direction to `Vector3(0, -1, 0)`.
PhysicsServer.area_set_param(get_viewport().find_world().get_space(), PhysicsServer.AREA_PARAM_GRAVITY_VECTOR, Vector3(0, -1, 0))
[/codeblock]
The default linear damp in 3D.
Sets which physics engine to use for 3D physics.
"DEFAULT" is currently the [url=https://bulletphysics.org]Bullet[/url] physics engine. The "GodotPhysics" engine is still supported as an alternative.
Enables [member Viewport.physics_object_picking] on the root viewport.
The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run.
[b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.iterations_per_second] instead.
Fix to improve physics jitter, specially on monitors where refresh rate is different than the physics FPS.
[b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_jitter_fix] instead.
When batching is on, this regularly prints a frame diagnosis log. Note that this will degrade performance.
[b]Experimental[/b] For regression testing against the old renderer. If this is switched on, and [code]use_batching[/code] is set, the renderer will swap alternately between using the old renderer, and the batched renderer, on each frame. This makes it easy to identify visual differences. Performance will be degraded.
Lights have the potential to prevent joining items, and break many of the performance benefits of batching. This setting enables some complex logic to allow joining items if their lighting is similar, and overlap tests pass. This can significantly improve performance in some games. Set to 0 to switch off. With large values the cost of overlap tests may lead to diminishing returns.
Sets the proportion of the total screen area (in pixels) that must be saved by a scissor operation in order to activate light scissoring. This can prevent parts of items being rendered outside the light area. Lower values scissor more aggressively. A value of 1 scissors none of the items, a value of 0 scissors every item. The power of 4 of the value is used, in order to emphasize the lower range, and multiplied by the total screen area in pixels to give the threshold. This can reduce fill rate requirements in scenes with a lot of lighting.
Enabling this setting uses the legacy method to draw batches containing only one rect. The legacy method is faster (approx twice as fast), but can cause flicker on some systems. In order to directly compare performance with the non-batching renderer you can set this to true, but it is recommended to turn this off unless you can guarantee your target hardware will work with this method.
Turns batching on and off. Batching increases performance by reducing the amount of graphics API drawcalls.
[b]Note:[/b] Currently only effective when using the GLES2 renderer.
Switches on batching within the editor.
[b]Note:[/b] Currently only effective when using the GLES2 renderer.
Size of buffer reserved for batched vertices. Larger size enables larger batches, but there are diminishing returns for the memory used. This should only have a minor effect on performance.
Including color in the vertex format has a cost, however, not including color prevents batching across color changes. This threshold determines the ratio of [code]number of vertex color changes / total number of vertices[/code] above which vertices will be translated to colored format. A value of 0 will always use colored vertices, 1 will never use colored vertices.
In certain circumstances, the batcher can reorder items in order to better join them. This may result in better performance. An overlap test is needed however for each item lookahead, so there is a trade off, with diminishing returns. If you are getting no benefit, setting this to 0 will switch it off.
Sets the number of commands to lookahead to determine whether to batch render items. A value of 1 can join items consisting of single commands, 0 turns off joining. Higher values are in theory more likely to join, however this has diminishing returns and has a runtime cost so a small value is recommended.
On some platforms (especially mobile), precision issues in shaders can lead to reading 1 texel outside of bounds, particularly where rects are scaled. This can particularly lead to border artifacts around tiles in tilemaps.
This adjustment corrects for this by making a small contraction to the UV coordinates used. Note that this can result in a slight squashing of border texels.
The amount of UV contraction. This figure is divided by 1000000, and is a proportion of the total texture dimensions, where the width and height are both ranged from 0.0 to 1.0.
Use the default unless correcting for a problem on particular hardware.
Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method VisualServer.set_default_clear_color].
[Environment] that will be used as a fallback environment in case a scene does not specify its own environment. The default environment is loaded in at scene load time regardless of whether you have set an environment or not. If you do not rely on the fallback environment, it is best to delete [code]default_env.tres[/code], or to specify a different default environment here.
The use of half-float vertex compression may be producing rendering errors on some platforms (especially iOS). These have been seen particularly in particles. Disabling half-float may resolve these problems.
If [code]true[/code] and available on the target device, enables high floating point precision for all shader computations in GLES2.
[b]Warning:[/b] High floating point precision can be extremely slow on older devices and is often not available at all. Use with caution.
Max buffer size for blend shapes. Any blend shape bigger than this will not work.
Max buffer size for drawing polygons. Any polygon bigger than this will not work.
Max index buffer size for drawing polygons. Any polygon bigger than this will not work.
Max buffer size for drawing immediate objects (ImmediateGeometry nodes). Nodes using more than this size will not work.
Max amount of elements renderable in a frame. If more than this are visible per frame, they will be dropped. Keep in mind elements refer to mesh surfaces and not meshes themselves.
Max number of lights renderable in a frame. If more than this number are used, they will be ignored. On some systems (particularly web) setting this number as low as possible can increase the speed of shader compilation.
Max number of reflection probes renderable in a frame. If more than this number are used, they will be ignored. On some systems (particularly web) setting this number as low as possible can increase the speed of shader compilation.
Shaders have a time variable that constantly increases. At some point, it needs to be rolled back to zero to avoid precision errors on shader animations. This setting specifies when (in seconds).
Some NVIDIA GPU drivers have a bug which produces flickering issues for the [code]draw_rect[/code] method, especially as used in [TileMap]. Refer to [url=https://github.com/godotengine/godot/issues/9913]GitHub issue 9913[/url] for details.
If [code]true[/code], this option enables a "safe" code path for such NVIDIA GPUs at the cost of performance. This option affects GLES2 and GLES3 rendering, but only on desktop platforms.
If [code]true[/code], forces snapping of polygons to pixels in 2D rendering. May help in some pixel art styles.
Consider using the project setting [member rendering/batching/precision/uv_contract] to prevent artifacts.
If [code]true[/code], allocates the main framebuffer with high dynamic range. High dynamic range allows the use of [Color] values greater than 1.
[b]Note:[/b] Only available on the GLES3 backend.
Lower-end override for [member rendering/quality/depth/hdr] on mobile devices, due to performance concerns or driver support.
Disables depth pre-pass for some GPU vendors (usually mobile), as their architecture already does this.
If [code]true[/code], performs a previous depth pass before rendering materials. This increases performance in scenes with high overdraw, when complex materials and lighting are used.
The directional shadow's size in pixels. Higher values will result in sharper shadows, at the cost of performance. The value will be rounded up to the nearest power of 2.
Lower-end override for [member rendering/quality/directional_shadow/size] on mobile devices, due to performance concerns or driver support.
The video driver to use ("GLES2" or "GLES3").
[b]Note:[/b] The backend in use can be overridden at runtime via the [code]--video-driver[/code] command line argument, or by the [member rendering/quality/driver/fallback_to_gles2] option if the target system does not support GLES3 and falls back to GLES2. In such cases, this property is not updated, so use [method OS.get_current_video_driver] to query it at run-time.
If [code]true[/code], allows falling back to the GLES2 driver if the GLES3 driver is not supported.
[b]Note:[/b] The two video drivers are not drop-in replacements for each other, so a game designed for GLES3 might not work properly when falling back to GLES2. In particular, some features of the GLES3 backend are not available in GLES2. Enabling this setting also means that both ETC and ETC2 VRAM-compressed textures will be exported on Android and iOS, increasing the data pack's size.
Maximum anisotropic filter level used for textures with anisotropy enabled. Higher values will result in sharper textures when viewed from oblique angles, at the cost of performance. Only power-of-two values are valid (2, 4, 8, 16).
Sets the number of MSAA samples to use. MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware.
[b]Note:[/b] MSAA is not available on HTML5 export using the GLES2 backend.
If [code]true[/code], uses nearest-neighbor mipmap filtering when using mipmaps (also called "bilinear filtering"), which will result in visible seams appearing between mipmap stages. This may increase performance in mobile as less memory bandwidth is used. If [code]false[/code], linear mipmap filtering (also called "trilinear filtering") is used.
Strategy used for framebuffer allocation. The simpler it is, the less resources it uses (but the less features it supports). If set to "2D Without Sampling" or "3D Without Effects", sample buffers will not be allocated. This means [code]SCREEN_TEXTURE[/code] and [code]DEPTH_TEXTURE[/code] will not be available in shaders and post-processing effects will not be available in the [Environment].
Lower-end override for [member rendering/quality/intended_usage/framebuffer_allocation] on mobile devices, due to performance concerns or driver support.
Size of the atlas used by reflection probes. A larger size can result in higher visual quality, while a smaller size will be faster and take up less memory.
Number of subdivisions to use for the reflection atlas. A higher number lowers the quality of each atlas, but allows you to use more.
If [code]true[/code], uses a high amount of samples to create blurred variants of reflection probes and panorama backgrounds (sky). Those blurred variants are used by rough materials.
Lower-end override for [member rendering/quality/reflections/high_quality_ggx] on mobile devices, due to performance concerns or driver support.
Limits the size of the irradiance map which is normally determined by [member Sky.radiance_size]. A higher size results in a higher quality irradiance map similarly to [member rendering/quality/reflections/high_quality_ggx]. Use a higher value when using high-frequency HDRI maps, otherwise keep this as low as possible.
[b]Note:[/b] Low and mid range hardware do not support complex irradiance maps well and may crash if this is set too high.
If [code]true[/code], uses texture arrays instead of mipmaps for reflection probes and panorama backgrounds (sky). This reduces jitter noise on reflections, but costs more performance and memory.
Lower-end override for [member rendering/quality/reflections/texture_array_reflections] on mobile devices, due to performance concerns or driver support.
If [code]true[/code], uses faster but lower-quality Blinn model to generate blurred reflections instead of the GGX model.
Lower-end override for [member rendering/quality/shading/force_blinn_over_ggx] on mobile devices, due to performance concerns or driver support.
If [code]true[/code], uses faster but lower-quality Lambert material lighting model instead of Burley.
Lower-end override for [member rendering/quality/shading/force_lambert_over_burley] on mobile devices, due to performance concerns or driver support.
If [code]true[/code], forces vertex shading for all rendering. This can increase performance a lot, but also reduces quality immensely. Can be used to optimize performance on low-end mobile devices.
Lower-end override for [member rendering/quality/shading/force_vertex_shading] on mobile devices, due to performance concerns or driver support.
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
Subdivision quadrant size for shadow mapping. See shadow mapping documentation.
Size for shadow atlas (used for OmniLights and SpotLights). See documentation.
Lower-end override for [member rendering/quality/shadow_atlas/size] on mobile devices, due to performance concerns or driver support.
Shadow filter mode. Higher-quality settings result in smoother shadows that flicker less when moving. "Disabled" is the fastest option, but also has the lowest quality. "PCF5" is smoother but is also slower. "PCF13" is the smoothest option, but is also the slowest.
Lower-end override for [member rendering/quality/shadows/filter_mode] on mobile devices, due to performance concerns or driver support.
Improves quality of subsurface scattering, but cost significantly increases.
Quality setting for subsurface scattering (samples taken).
Max radius used for subsurface scattering samples.
Weight subsurface scattering samples. Helps to avoid reading samples from unrelated parts of the screen.
Use high-quality voxel cone tracing. This results in better-looking reflections, but is much more expensive on the GPU.
Thread model for rendering. Rendering on a thread can vastly improve performance, but synchronizing to the main thread can cause a bit more jitter.
If [code]true[/code], the texture importer will import VRAM-compressed textures using the BPTC algorithm. This texture compression algorithm is only supported on desktop platforms, and only when using the GLES3 renderer.
If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression algorithm. This algorithm doesn't support alpha channels in textures.
If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression 2 algorithm. This texture compression algorithm is only supported when using the GLES3 renderer.
If [code]true[/code], the texture importer will import VRAM-compressed textures using the PowerVR Texture Compression algorithm. This texture compression algorithm is only supported on iOS.
If [code]true[/code], the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm. This algorithm is only supported on desktop platforms and consoles.
Cell size used for the 2D hash grid that [VisibilityNotifier2D] uses (in pixels).