diff options
Diffstat (limited to 'doc/classes/ProjectSettings.xml')
-rw-r--r-- | doc/classes/ProjectSettings.xml | 159 |
1 files changed, 131 insertions, 28 deletions
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index ed8eddda07..d0f2a927cb 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -9,6 +9,9 @@ [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. </description> <tutorials> + <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> + <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link> + <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link> </tutorials> <methods> <method name="add_property_info"> @@ -22,7 +25,8 @@ - [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] + [codeblocks] + [gdscript] ProjectSettings.set("category/property_name", 0) var property_info = { @@ -33,7 +37,21 @@ } ProjectSettings.add_property_info(property_info) - [/codeblock] + [/gdscript] + [csharp] + ProjectSettings.Singleton.Set("category/property_name", 0); + + var propertyInfo = new Godot.Collections.Dictionary + { + {"name", "category/propertyName"}, + {"type", Variant.Type.Int}, + {"hint", PropertyHint.Enum}, + {"hint_string", "one,two,three"}, + }; + + ProjectSettings.AddPropertyInfo(propertyInfo); + [/csharp] + [/codeblocks] </description> </method> <method name="clear"> @@ -62,9 +80,14 @@ <description> Returns the value of a setting. [b]Example:[/b] - [codeblock] + [codeblocks] + [gdscript] print(ProjectSettings.get_setting("application/config/name")) - [/codeblock] + [/gdscript] + [csharp] + GD.Print(ProjectSettings.GetSetting("application/config/name")); + [/csharp] + [/codeblocks] </description> </method> <method name="globalize_path" qualifiers="const"> @@ -73,7 +96,21 @@ <argument index="0" name="path" type="String"> </argument> <description> - Converts a localized path ([code]res://[/code]) to a full native OS path. + Returns the absolute, native OS path corresponding to the localized [code]path[/code] (starting with [code]res://[/code] or [code]user://[/code]). The returned path will vary depending on the operating system and user preferences. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] to see what those paths convert to. See also [method localize_path]. + [b]Note:[/b] [method globalize_path] with [code]res://[/code] will not work in an exported project. Instead, prepend the executable's base directory to the path when running from an exported project: + [codeblock] + var path = "" + if OS.has_feature("editor"): + # Running from an editor binary. + # `path` will contain the absolute path to `hello.txt` located in the project root. + path = ProjectSettings.globalize_path("res://hello.txt") + else: + # Running from an exported project. + # `path` will contain the absolute path to `hello.txt` next to the executable. + # This is *not* identical to using `ProjectSettings.globalize_path()` with a `res://` path, + # but is close enough in spirit. + path = OS.get_executable_path().get_base_dir().plus_file("hello.txt") + [/codeblock] </description> </method> <method name="has_setting" qualifiers="const"> @@ -106,7 +143,7 @@ <argument index="0" name="path" type="String"> </argument> <description> - Convert a path to a localized path ([code]res://[/code] path). + Returns the localized path (starting with [code]res://[/code]) corresponding to the absolute, native OS [code]path[/code]. See also [method globalize_path]. </description> </method> <method name="property_can_revert"> @@ -175,9 +212,14 @@ <description> Sets the value of a setting. [b]Example:[/b] - [codeblock] + [codeblocks] + [gdscript] ProjectSettings.set_setting("application/config/name", "Example") - [/codeblock] + [/gdscript] + [csharp] + ProjectSettings.SetSetting("application/config/name", "Example"); + [/csharp] + [/codeblocks] </description> </method> </methods> @@ -227,6 +269,14 @@ <member name="application/run/disable_stdout" type="bool" setter="" getter="" default="false"> If [code]true[/code], disables printing to standard output in an exported build. </member> + <member name="application/run/flush_stdout_on_print" type="bool" setter="" getter="" default="false"> + If [code]true[/code], 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"). + [b]Note:[/b] Regardless of this setting, the standard error stream ([code]stderr[/code]) is always flushed when a line is printed to it. + </member> + <member name="application/run/flush_stdout_on_print.debug" type="bool" setter="" getter="" default="true"> + Debug build override for [member application/run/flush_stdout_on_print], as performance is less important during debugging. + </member> <member name="application/run/frame_delay_msec" type="int" setter="" getter="" default="0"> Forces a delay between frames in the main loop (in milliseconds). This may be useful if you plan to disable vertical synchronization. </member> @@ -425,6 +475,9 @@ <member name="display/window/energy_saving/keep_screen_on" type="bool" setter="" getter="" default="true"> 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. </member> + <member name="display/window/force_right_to_left_layout_direction" type="bool" setter="" getter="" default="false"> + Force layout direction and text writing direction to RTL for all locales. + </member> <member name="display/window/handheld/orientation" type="String" setter="" getter="" default=""landscape""> Default orientation on mobile devices. </member> @@ -432,19 +485,24 @@ If [code]true[/code], the home indicator is hidden automatically. This only affects iOS devices without a physical home button. </member> <member name="display/window/size/always_on_top" type="bool" setter="" getter="" default="false"> - Force the window to be always on top. + Forces the main window to be always on top. + [b]Note:[/b] This setting is ignored on iOS, Android, and HTML5. </member> <member name="display/window/size/borderless" type="bool" setter="" getter="" default="false"> - Force the window to be borderless. + Forces the main window to be borderless. + [b]Note:[/b] This setting is ignored on iOS, Android, and HTML5. </member> <member name="display/window/size/fullscreen" type="bool" setter="" getter="" default="false"> - Sets the window to full screen when it starts. + Sets the main window to full screen when the project starts. Note that this is not [i]exclusive[/i] 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 [url=https://docs.godotengine.org/en/latest/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode. + [b]Note:[/b] This setting is ignored on iOS, Android, and HTML5. </member> <member name="display/window/size/height" type="int" setter="" getter="" default="600"> 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. </member> <member name="display/window/size/resizable" type="bool" setter="" getter="" default="true"> Allows the window to be resizable by default. + [b]Note:[/b] This setting is ignored on iOS and Android. </member> <member name="display/window/size/test_height" type="int" setter="" getter="" default="0"> If greater than zero, overrides the window height when running the game. Useful for testing stretch modes. @@ -458,6 +516,9 @@ <member name="display/window/tablet_driver" type="String" setter="" getter=""> Specifies the tablet driver to use. If left empty, the default driver will be used. </member> + <member name="display/window/text_name" type="String" setter="" getter="" default=""""> + Specifies the [TextServer] to use. If left empty, the default will be used. + </member> <member name="display/window/vsync/use_vsync" type="bool" setter="" getter="" default="true"> 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). </member> @@ -466,7 +527,7 @@ [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. </member> <member name="editor/script_templates_search_path" type="String" setter="" getter="" default=""res://script_templates""> - Search path for project-specific script templates. Script templates will be search both in the editor-specific path and in this project-specific path. + 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. </member> <member name="editor/search_in_file_extensions" type="PackedStringArray" setter="" getter="" default="PackedStringArray( "gd", "shader" )"> 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. @@ -555,6 +616,9 @@ <member name="input_devices/pointing/emulate_touch_from_mouse" type="bool" setter="" getter="" default="false"> If [code]true[/code], sends touch input events when clicking or dragging the mouse. </member> + <member name="input_devices/pointing/ios/touch_delay" type="float" setter="" getter="" default="0.15"> + Default delay for touch events. This only affects iOS devices. + </member> <member name="layer_names/2d_physics/layer_1" type="String" setter="" getter="" default=""""> Optional name for the 2D physics layer 1. </member> @@ -812,7 +876,9 @@ <member name="logging/file_logging/max_log_files" type="int" setter="" getter="" default="5"> Specifies the maximum amount of log files allowed (used for rotation). </member> - <member name="memory/limits/message_queue/max_size_kb" type="int" setter="" getter="" default="1024"> + <member name="memory/limits/command_queue/multithreading_queue_size_kb" type="int" setter="" getter="" default="256"> + </member> + <member name="memory/limits/message_queue/max_size_kb" type="int" setter="" getter="" default="4096"> 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. </member> <member name="memory/limits/multithreaded_server/rid_pool_prealloc" type="int" setter="" getter="" default="60"> @@ -845,7 +911,7 @@ Maximum number of warnings allowed to be sent from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. </member> <member name="network/limits/packet_peer_stream/max_buffer_po2" type="int" setter="" getter="" default="16"> - Default size of packet peer stream for deserializing Godot data. Over this size, data is dropped. + Default size of packet peer stream for deserializing Godot data (in bytes, specified as a power of two). The default value [code]16[/code] is equal to 65,536 bytes. Over this size, data is dropped. </member> <member name="network/limits/tcp/connect_timeout_seconds" type="int" setter="" getter="" default="30"> Timeout (in seconds) for connection attempts using TCP. @@ -877,25 +943,39 @@ </member> <member name="physics/2d/default_angular_damp" type="float" setter="" getter="" default="1.0"> The default angular damp in 2D. + [b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_fps], [code]60[/code] by default) will bring the object to a stop in one iteration. </member> <member name="physics/2d/default_gravity" type="int" setter="" getter="" default="98"> 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] + [codeblocks] + [gdscript] # Set the default gravity strength to 98. - PhysicsServer2D.area_set_param(get_viewport().find_world_2d().get_space(), PhysicsServer2D.AREA_PARAM_GRAVITY, 98) - [/codeblock] + PhysicsServer2D.area_set_param(get_viewport().find_world_2d().space, PhysicsServer2D.AREA_PARAM_GRAVITY, 98) + [/gdscript] + [csharp] + // Set the default gravity strength to 98. + PhysicsServer2D.AreaSetParam(GetViewport().FindWorld2d().Space, PhysicsServer2D.AreaParameter.Gravity, 98); + [/csharp] + [/codeblocks] </member> <member name="physics/2d/default_gravity_vector" type="Vector2" setter="" getter="" default="Vector2( 0, 1 )"> 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] + [codeblocks] + [gdscript] # Set the default gravity direction to `Vector2(0, 1)`. - PhysicsServer2D.area_set_param(get_viewport().find_world_2d().get_space(), PhysicsServer2D.AREA_PARAM_GRAVITY_VECTOR, Vector2(0, 1)) - [/codeblock] + PhysicsServer2D.area_set_param(get_viewport().find_world_2d().space, PhysicsServer2D.AREA_PARAM_GRAVITY_VECTOR, Vector2.DOWN) + [/gdscript] + [csharp] + // Set the default gravity direction to `Vector2(0, 1)`. + PhysicsServer2D.AreaSetParam(GetViewport().FindWorld2d().Space, PhysicsServer2D.AreaParameter.GravityVector, Vector2.Down) + [/csharp] + [/codeblocks] </member> <member name="physics/2d/default_linear_damp" type="float" setter="" getter="" default="0.1"> The default linear damp in 2D. + [b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_fps], [code]60[/code] by default) will bring the object to a stop in one iteration. </member> <member name="physics/2d/large_object_surface_threshold_in_cells" type="int" setter="" getter="" default="512"> Threshold defining the surface size that constitutes a large object with regard to cells in the broad-phase 2D hash grid algorithm. @@ -922,25 +1002,39 @@ </member> <member name="physics/3d/default_angular_damp" type="float" setter="" getter="" default="0.1"> The default angular damp in 3D. + [b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_fps], [code]60[/code] by default) will bring the object to a stop in one iteration. </member> <member name="physics/3d/default_gravity" type="float" setter="" getter="" default="9.8"> 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] + [codeblocks] + [gdscript] # Set the default gravity strength to 9.8. - PhysicsServer3D.area_set_param(get_viewport().find_world().get_space(), PhysicsServer3D.AREA_PARAM_GRAVITY, 9.8) - [/codeblock] + PhysicsServer3D.area_set_param(get_viewport().find_world().space, PhysicsServer3D.AREA_PARAM_GRAVITY, 9.8) + [/gdscript] + [csharp] + // Set the default gravity strength to 9.8. + PhysicsServer3D.AreaSetParam(GetViewport().FindWorld().Space, PhysicsServer3D.AreaParameter.Gravity, 9.8); + [/csharp] + [/codeblocks] </member> <member name="physics/3d/default_gravity_vector" type="Vector3" setter="" getter="" default="Vector3( 0, -1, 0 )"> 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] + [codeblocks] + [gdscript] # Set the default gravity direction to `Vector3(0, -1, 0)`. - PhysicsServer3D.area_set_param(get_viewport().find_world().get_space(), PhysicsServer3D.AREA_PARAM_GRAVITY_VECTOR, Vector3(0, -1, 0)) - [/codeblock] + PhysicsServer3D.area_set_param(get_viewport().find_world().get_space(), PhysicsServer3D.AREA_PARAM_GRAVITY_VECTOR, Vector3.DOWN) + [/gdscript] + [csharp] + // Set the default gravity direction to `Vector3(0, -1, 0)`. + PhysicsServer3D.AreaSetParam(GetViewport().FindWorld().Space, PhysicsServer3D.AreaParameter.GravityVector, Vector3.Down) + [/csharp] + [/codeblocks] </member> <member name="physics/3d/default_linear_damp" type="float" setter="" getter="" default="0.1"> The default linear damp in 3D. + [b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_fps], [code]60[/code] by default) will bring the object to a stop in one iteration. </member> <member name="physics/3d/physics_engine" type="String" setter="" getter="" default=""DEFAULT""> Sets which physics engine to use for 3D physics. @@ -994,8 +1088,15 @@ </member> <member name="rendering/limits/time/time_rollover_secs" type="float" setter="" getter="" default="3600"> </member> - <member name="rendering/quality/2d/use_pixel_snap" type="bool" setter="" getter="" default="false"> - If [code]true[/code], forces snapping of polygons to pixels in 2D rendering. May help in some pixel art styles. + <member name="rendering/quality/2d/snap_2d_transforms_to_pixel" type="bool" setter="" getter="" default="false"> + </member> + <member name="rendering/quality/2d/snap_2d_vertices_to_pixel" type="bool" setter="" getter="" default="false"> + </member> + <member name="rendering/quality/2d_sdf/oversize" type="int" setter="" getter="" default="1"> + </member> + <member name="rendering/quality/2d_sdf/scale" type="int" setter="" getter="" default="1"> + </member> + <member name="rendering/quality/2d_shadow_atlas/size" type="int" setter="" getter="" default="2048"> </member> <member name="rendering/quality/depth_of_field/depth_of_field_bokeh_quality" type="int" setter="" getter="" default="2"> Sets the quality of the depth of field effect. Higher quality takes more samples, which is slower but looks smoother. @@ -1092,6 +1193,8 @@ </member> <member name="rendering/quality/screen_filters/screen_space_roughness_limiter_limit" type="float" setter="" getter="" default="0.18"> </member> + <member name="rendering/quality/screen_filters/use_debanding" type="bool" setter="" getter="" default="false"> + </member> <member name="rendering/quality/screen_space_reflection/roughness_quality" type="int" setter="" getter="" default="1"> Sets the quality for rough screen-space reflections. Turning off will make all screen space reflections sharp, while higher values make rough reflections look better. </member> |