diff options
Diffstat (limited to 'doc/classes')
43 files changed, 371 insertions, 195 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index ed404ea504..09713bce2f 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -2734,17 +2734,10 @@ <constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="21" enum="PropertyHint"> Hints that a [Color] property should be edited without affecting its transparency ([member Color.a] is not editable). </constant> - <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="22" enum="PropertyHint"> - Hints that an image is compressed using lossy compression. The editor does not internally use this property hint. + <constant name="PROPERTY_HINT_OBJECT_ID" value="22" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="23" enum="PropertyHint"> - Hints that an image is compressed using lossless compression. The editor does not internally use this property hint. - </constant> - <constant name="PROPERTY_HINT_OBJECT_ID" value="24" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_TYPE_STRING" value="25" enum="PropertyHint"> - Hints that a property represents a particular type. If a property is [constant TYPE_STRING], allows to set a type from the create dialog. If you need to create an [Array] to contain elements of a specific type, the [code]hint_string[/code] must encode nested types using [code]":"[/code] and [code]"/"[/code] for specifying [Resource] types. - [b]Example:[/b] + <constant name="PROPERTY_HINT_TYPE_STRING" value="23" enum="PropertyHint"> + Hint that a property represents a particular type. If a property is [constant TYPE_STRING], allows to set a type from the create dialog. If you need to create an [Array] to contain elements of a specific type, the [code]hint_string[/code] must encode nested types using [code]":"[/code] and [code]"/"[/code] for specifying [Resource] types. For instance: [codeblock] hint_string = "%s:" % [TYPE_INT] # Array of integers. hint_string = "%s:%s:" % [TYPE_ARRAY, TYPE_REAL] # Two-dimensional array of floats. @@ -2753,56 +2746,53 @@ [/codeblock] [b]Note:[/b] The final colon is required for properly detecting built-in types. </constant> - <constant name="PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE" value="26" enum="PropertyHint"> + <constant name="PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE" value="24" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_METHOD_OF_VARIANT_TYPE" value="27" enum="PropertyHint"> + <constant name="PROPERTY_HINT_METHOD_OF_VARIANT_TYPE" value="25" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_METHOD_OF_BASE_TYPE" value="28" enum="PropertyHint"> + <constant name="PROPERTY_HINT_METHOD_OF_BASE_TYPE" value="26" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_METHOD_OF_INSTANCE" value="29" enum="PropertyHint"> + <constant name="PROPERTY_HINT_METHOD_OF_INSTANCE" value="27" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_METHOD_OF_SCRIPT" value="30" enum="PropertyHint"> + <constant name="PROPERTY_HINT_METHOD_OF_SCRIPT" value="28" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE" value="31" enum="PropertyHint"> + <constant name="PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE" value="29" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_PROPERTY_OF_BASE_TYPE" value="32" enum="PropertyHint"> + <constant name="PROPERTY_HINT_PROPERTY_OF_BASE_TYPE" value="30" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_PROPERTY_OF_INSTANCE" value="33" enum="PropertyHint"> + <constant name="PROPERTY_HINT_PROPERTY_OF_INSTANCE" value="31" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_PROPERTY_OF_SCRIPT" value="34" enum="PropertyHint"> + <constant name="PROPERTY_HINT_PROPERTY_OF_SCRIPT" value="32" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_OBJECT_TOO_BIG" value="35" enum="PropertyHint"> - Hints that a property's size (in bytes) is too big to be displayed, when debugging a running project. The debugger uses this hint internally. + <constant name="PROPERTY_HINT_OBJECT_TOO_BIG" value="33" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_NODE_PATH_VALID_TYPES" value="36" enum="PropertyHint"> + <constant name="PROPERTY_HINT_NODE_PATH_VALID_TYPES" value="34" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_SAVE_FILE" value="37" enum="PropertyHint"> + <constant name="PROPERTY_HINT_SAVE_FILE" value="35" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_GLOBAL_SAVE_FILE" value="38" enum="PropertyHint"> + <constant name="PROPERTY_HINT_GLOBAL_SAVE_FILE" value="36" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="39" enum="PropertyHint"> + <constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="37" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_INT_IS_POINTER" value="40" enum="PropertyHint"> + <constant name="PROPERTY_HINT_INT_IS_POINTER" value="38" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_ARRAY_TYPE" value="41" enum="PropertyHint"> + <constant name="PROPERTY_HINT_ARRAY_TYPE" value="39" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_LOCALE_ID" value="42" enum="PropertyHint"> - Hints that a [String] property is a locale code. Editing it will show a locale dialog for picking language and country. + <constant name="PROPERTY_HINT_LOCALE_ID" value="40" enum="PropertyHint"> + Hints that a string property is a locale code. Editing it will show a locale dialog for picking language and country. </constant> - <constant name="PROPERTY_HINT_LOCALIZABLE_STRING" value="43" enum="PropertyHint"> - Hints that a [Dictionary] property is string translation map. Dictionary keys are locale codes and, values are translated strings. + <constant name="PROPERTY_HINT_LOCALIZABLE_STRING" value="41" enum="PropertyHint"> + Hints that a dictionary property is string translation map. Dictionary keys are locale codes and, values are translated strings. </constant> - <constant name="PROPERTY_HINT_NODE_TYPE" value="44" enum="PropertyHint"> + <constant name="PROPERTY_HINT_NODE_TYPE" value="42" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_HIDE_QUATERNION_EDIT" value="45" enum="PropertyHint"> - Hints that a [Quaternion] property should disable the temporary euler editor. + <constant name="PROPERTY_HINT_HIDE_QUATERNION_EDIT" value="43" enum="PropertyHint"> + Hints that a quaternion property should disable the temporary euler editor. </constant> - <constant name="PROPERTY_HINT_PASSWORD" value="46" enum="PropertyHint"> - Hints that a [String] property is a password. Every character of the string is displayed as the secret character (typically [code]*[/code]). - An optional placeholder text can be shown on its input field, similarly to [constant PROPERTY_HINT_PLACEHOLDER_TEXT]. + <constant name="PROPERTY_HINT_PASSWORD" value="44" enum="PropertyHint"> + Hints that a string property is a password, and every character is replaced with the secret character. </constant> - <constant name="PROPERTY_HINT_MAX" value="47" enum="PropertyHint"> - Represents the size of the [enum PropertyHint] enum. + <constant name="PROPERTY_HINT_MAX" value="45" enum="PropertyHint"> </constant> <constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags"> The property is not stored, and does not display in the editor. This is the default for non-exported properties. diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index 008296713d..af8d9c416f 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -568,13 +568,6 @@ The animation step value. </member> </members> - <signals> - <signal name="tracks_changed"> - <description> - Emitted when there's a change in the list of tracks, e.g. tracks are added, moved or have changed paths. - </description> - </signal> - </signals> <constants> <constant name="TYPE_VALUE" value="0" enum="TrackType"> Value tracks set values in node properties, but only those which can be interpolated. For 3D position/rotation/scale, using the dedicated [constant TYPE_POSITION_3D], [constant TYPE_ROTATION_3D] and [constant TYPE_SCALE_3D] track types instead of [constant TYPE_VALUE] is recommended for performance reasons. diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index ab948dd0de..b9c8ab0f6c 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -25,10 +25,12 @@ m.mesh = arr_mesh [/gdscript] [csharp] - var vertices = new Godot.Collections.Array<Vector3>(); - vertices.Add(new Vector3(0, 1, 0)); - vertices.Add(new Vector3(1, 0, 0)); - vertices.Add(new Vector3(0, 0, 1)); + var vertices = new Vector3[] + { + new Vector3(0, 1, 0), + new Vector3(1, 0, 0), + new Vector3(0, 0, 1), + }; // Initialize the ArrayMesh. var arrMesh = new ArrayMesh(); @@ -38,7 +40,7 @@ // Create the Mesh. arrMesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, arrays); - var m = new MeshInstance(); + var m = new MeshInstance3D(); m.Mesh = arrMesh; [/csharp] [/codeblocks] diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index de980eab0c..fbb31cadcd 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -529,13 +529,13 @@ The material will use the texture's alpha values for transparency. </constant> <constant name="TRANSPARENCY_ALPHA_SCISSOR" value="2" enum="Transparency"> - The material will cut off all values below a threshold, the rest will remain opaque. + The material will cut off all values below a threshold, the rest will remain opaque. The opaque portions will be rendering in the depth prepass. </constant> <constant name="TRANSPARENCY_ALPHA_HASH" value="3" enum="Transparency"> The material will cut off all values below a spatially-deterministic threshold, the rest will remain opaque. </constant> <constant name="TRANSPARENCY_ALPHA_DEPTH_PRE_PASS" value="4" enum="Transparency"> - The material will use the texture's alpha value for transparency, but will still be rendered in the pre-pass. + The material will use the texture's alpha value for transparency, but will still be rendered in the depth prepass. </constant> <constant name="TRANSPARENCY_MAX" value="5" enum="Transparency"> Represents the size of the [enum Transparency] enum. @@ -613,13 +613,14 @@ Enables AlphaToCoverage and forces all non-zero alpha values to [code]1[/code]. Alpha values in the material are passed to the AntiAliasing sample mask. </constant> <constant name="DEPTH_DRAW_OPAQUE_ONLY" value="0" enum="DepthDrawMode"> - Default depth draw mode. Depth is drawn only for opaque objects. + Default depth draw mode. Depth is drawn only for opaque objects during the opaque prepass (if any) and during the opaque pass. </constant> <constant name="DEPTH_DRAW_ALWAYS" value="1" enum="DepthDrawMode"> - Depth draw is calculated for both opaque and transparent objects. + Objects will write to depth during the opaque and the transparent passes. Transparent objects that are close to the camera may obscure other transparent objects behind them. + [b]Note:[/b] This does not influence whether transparent objects are included in the depth prepass or not. For that, see [enum Transparency]. </constant> <constant name="DEPTH_DRAW_DISABLED" value="2" enum="DepthDrawMode"> - No depth draw. + Objects will not write their depth to the depth buffer, even during the depth prepass (if enabled). </constant> <constant name="CULL_BACK" value="0" enum="CullMode"> Default cull mode. The back of the object is culled when not visible. Back face triangles will be culled when facing the camera. This results in only the front side of triangles being drawn. For closed-surface meshes this means that only the exterior of the mesh will be visible. @@ -631,7 +632,7 @@ No culling is performed. </constant> <constant name="FLAG_DISABLE_DEPTH_TEST" value="0" enum="Flags"> - Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it. + Disables the depth test, so this object is drawn on top of all others drawn before it. This puts the object in the transparent draw pass where it is sorted based on distance to camera. Objects drawn after it in the draw order may cover it. This also disables writing to depth. </constant> <constant name="FLAG_ALBEDO_FROM_VERTEX_COLOR" value="1" enum="Flags"> Set [code]ALBEDO[/code] to the per-vertex color specified in the mesh. diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml index 0111ef804e..7395556d05 100644 --- a/doc/classes/CharacterBody2D.xml +++ b/doc/classes/CharacterBody2D.xml @@ -10,7 +10,7 @@ </description> <tutorials> <link title="Kinematic character (2D)">$DOCS_URL/tutorials/physics/kinematic_character_2d.html</link> - <link title="Using KinematicBody2D">$DOCS_URL/tutorials/physics/using_kinematic_body_2d.html</link> + <link title="Using CharacterBody2D">$DOCS_URL/tutorials/physics/using_character_body_2d.html</link> <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link> <link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link> </tutorials> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index e1dd2819b2..8a38deeebe 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -1010,6 +1010,10 @@ <member name="layout_direction" type="int" setter="set_layout_direction" getter="get_layout_direction" enum="Control.LayoutDirection" default="0"> Controls layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew). </member> + <member name="localize_numeral_system" type="bool" setter="set_localize_numeral_system" getter="is_localizing_numeral_system" default="true"> + If [code]true[/code], automatically converts code line numbers, list indices, [SpinBox] and [ProgressBar] values from the Western Arabic (0..9) to the numeral systems used in current locale. + [b]Note:[/b] Numbers within the text are not automatically converted, it can be done manually, using [method TextServer.format_number]. + </member> <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" enum="Control.CursorShape" default="0"> The default cursor shape for this control. Useful for Godot plugins and applications or games that use the system's mouse cursors. [b]Note:[/b] On Linux, shapes may vary depending on the cursor theme of the system. @@ -1048,7 +1052,7 @@ </member> <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)"> The node's scale, relative to its [member size]. Change this property to scale the node around its [member pivot_offset]. The Control's [member tooltip_text] will also scale according to this value. - [b]Note:[/b] This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [url=$DOCS_URL/tutorials/viewports/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually. + [b]Note:[/b] This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually. [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instantiated. To set the Control's scale when it's instantiated, wait for one frame using [code]await get_tree().process_frame[/code] then set its [member scale] property. </member> <member name="shortcut_context" type="Node" setter="set_shortcut_context" getter="get_shortcut_context"> diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index 3e4e05f51a..63134417b1 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -132,6 +132,15 @@ If the curve has no up vectors, the function sends an error to the console, and returns [code](0, 1, 0)[/code]. </description> </method> + <method name="sample_baked_with_rotation" qualifiers="const"> + <return type="Transform3D" /> + <param index="0" name="offset" type="float" /> + <param index="1" name="cubic" type="bool" default="false" /> + <param index="2" name="apply_tilt" type="bool" default="false" /> + <description> + Similar with [code]interpolate_baked()[/code]. The the return value is [code]Transform3D[/code], with [code]origin[/code] as point position, [code]basis.x[/code] as sideway vector, [code]basis.y[/code] as up vector, [code]basis.z[/code] as forward vector. When the curve length is 0, there is no reasonable way to caculate the rotation, all vectors aligned with global space axes. + </description> + </method> <method name="samplef" qualifiers="const"> <return type="Vector3" /> <param index="0" name="fofs" type="float" /> diff --git a/doc/classes/DirectionalLight2D.xml b/doc/classes/DirectionalLight2D.xml index a1b8ea86be..7a54980c19 100644 --- a/doc/classes/DirectionalLight2D.xml +++ b/doc/classes/DirectionalLight2D.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="DirectionalLight2D" inherits="Light2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Directional light from a distance. </brief_description> <description> + A directional light is a type of [Light2D] node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene (for example: to model sunlight or moonlight). </description> <tutorials> </tutorials> @@ -11,6 +13,7 @@ The height of the light. Used with 2D normal mapping. Ranges from 0 (parallel to the plane) to 1 (perpendicular to the plane). </member> <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="10000.0"> + Maximum distance this light covers. Increasing this value will make directional shadows visible from further away, at the cost of lower overall shadow detail and performance (due to more objects being included in shadow rendering). </member> </members> </class> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 76c67fd704..0039301bf6 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -1638,8 +1638,9 @@ Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode. </constant> <constant name="WINDOW_MODE_EXCLUSIVE_FULLSCREEN" value="4" enum="WindowMode"> - Exclusive full screen window mode. This mode is implemented on Windows only. On other platforms, it is equivalent to [constant WINDOW_MODE_FULLSCREEN]. - Only one window in exclusive full screen mode can be visible on a given screen at a time. If multiple windows are in exclusive full screen mode for the same screen, the last one being set to this mode takes precedence. + Exclusive full screen window mode. This mode is implemented on Windows and macOS only. On other platforms, it is equivalent to [constant WINDOW_MODE_FULLSCREEN]. + [b]On Windows:[/b] Only one window in exclusive full screen mode can be visible on a given screen at a time. If multiple windows are in exclusive full screen mode for the same screen, the last one being set to this mode takes precedence. + [b]On macOS:[/b] Exclusive full-screen mode prevents Dock and Menu from showing up when the mouse pointer is hovering the edge of the screen. Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode. </constant> <constant name="WINDOW_FLAG_RESIZE_DISABLED" value="0" enum="WindowFlags"> diff --git a/doc/classes/EditorDebuggerPlugin.xml b/doc/classes/EditorDebuggerPlugin.xml index c3e0a995c6..10da1edd56 100644 --- a/doc/classes/EditorDebuggerPlugin.xml +++ b/doc/classes/EditorDebuggerPlugin.xml @@ -1,88 +1,88 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="EditorDebuggerPlugin" inherits="Control" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="EditorDebuggerPlugin" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> A base class to implement debugger plugins. </brief_description> <description> [EditorDebuggerPlugin] provides functions related to the editor side of the debugger. - You don't need to instantiate this class; that is automatically handled by the debugger. [Control] nodes can be added as child nodes to provide a GUI for the plugin. - Do not free or reparent this node, otherwise it becomes unusable. - To use [EditorDebuggerPlugin], register it using the [method EditorPlugin.add_debugger_plugin] method first. + To interact with the debugger, an instance of this class must be added to the editor via [method EditorPlugin.add_debugger_plugin]. + Once added, the [method _setup_session] callback will be called for every [EditorDebuggerSession] available to the plugin, and when new ones are created (the sessions may be inactive during this stage). + You can retrieve the available [EditorDebuggerSession]s via [method get_sessions] or get a specific one via [method get_session]. + [codeblocks] + [gdscript] + @tool + extends EditorPlugin + + class ExampleEditorDebugger extends EditorDebuggerPlugin: + + func _has_capture(prefix): + # Return true if you wish to handle message with this prefix. + return prefix == "my_plugin" + + func _capture(message, data, session_id): + if message == "my_plugin:ping": + get_session(session_id).send_message("my_plugin:echo", data) + + func _setup_session(session_id): + # Add a new tab in the debugger session UI containing a label. + var label = Label.new() + label.name = "Example plugin" + label.text = "Example plugin" + var session = get_session(session_id) + # Listens to the session started and stopped signals. + session.started.connect(func (): print("Session started")) + session.stopped.connect(func (): print("Session stopped")) + session.add_session_tab(label) + + var debugger = ExampleEditorDebugger.new() + + func _enter_tree(): + add_debugger_plugin(debugger) + + func _exit_tree(): + remove_debugger_plugin(debugger) + [/gdscript] + [/codeblocks] </description> <tutorials> </tutorials> <methods> - <method name="has_capture"> - <return type="bool" /> - <param index="0" name="name" type="StringName" /> - <description> - Returns [code]true[/code] if a message capture with given name is present otherwise [code]false[/code]. - </description> - </method> - <method name="is_breaked"> - <return type="bool" /> - <description> - Returns [code]true[/code] if the game is in break state otherwise [code]false[/code]. - </description> - </method> - <method name="is_debuggable"> + <method name="_capture" qualifiers="virtual"> <return type="bool" /> + <param index="0" name="message" type="String" /> + <param index="1" name="data" type="Array" /> + <param index="2" name="session_id" type="int" /> <description> - Returns [code]true[/code] if the game can be debugged otherwise [code]false[/code]. + Override this method to process incoming messages. The [param session_id] is the ID of the [EditorDebuggerSession] that received the message (which you can retrieve via [method get_session]). </description> </method> - <method name="is_session_active"> + <method name="_has_capture" qualifiers="virtual const"> <return type="bool" /> + <param index="0" name="capture" type="String" /> <description> - Returns [code]true[/code] if there is an instance of the game running with the attached debugger otherwise [code]false[/code]. + Override this method to enable receiving messages from the debugger. If [param capture] is "my_message" then messages starting with "my_message:" will be passes to the [method _capture] method. </description> </method> - <method name="register_message_capture"> + <method name="_setup_session" qualifiers="virtual"> <return type="void" /> - <param index="0" name="name" type="StringName" /> - <param index="1" name="callable" type="Callable" /> + <param index="0" name="session_id" type="int" /> <description> - Registers a message capture with given [param name]. If [param name] is "my_message" then messages starting with "my_message:" will be called with the given callable. - Callable must accept a message string and a data array as argument. If the message and data are valid then callable must return [code]true[/code] otherwise [code]false[/code]. + Override this method to be notified whenever a new [EditorDebuggerSession] is created (the session may be inactive during this stage). </description> </method> - <method name="send_message"> - <return type="void" /> - <param index="0" name="message" type="String" /> - <param index="1" name="data" type="Array" /> + <method name="get_session"> + <return type="EditorDebuggerSession" /> + <param index="0" name="id" type="int" /> <description> - Sends a message with given [param message] and [param data] array. + Returns the [EditorDebuggerSession] with the given [param id]. </description> </method> - <method name="unregister_message_capture"> - <return type="void" /> - <param index="0" name="name" type="StringName" /> + <method name="get_sessions"> + <return type="Array" /> <description> - Unregisters the message capture with given name. + Returns an array of [EditorDebuggerSession] currently available to this debugger plugin. + Note: Not sessions in the array may be inactive, check their state via [method EditorDebuggerSession.is_active] </description> </method> </methods> - <signals> - <signal name="breaked"> - <param index="0" name="can_debug" type="bool" /> - <description> - Emitted when the game enters a break state. - </description> - </signal> - <signal name="continued"> - <description> - Emitted when the game exists a break state. - </description> - </signal> - <signal name="started"> - <description> - Emitted when the debugging starts. - </description> - </signal> - <signal name="stopped"> - <description> - Emitted when the debugging stops. - </description> - </signal> - </signals> </class> diff --git a/doc/classes/EditorDebuggerSession.xml b/doc/classes/EditorDebuggerSession.xml new file mode 100644 index 0000000000..faf528c143 --- /dev/null +++ b/doc/classes/EditorDebuggerSession.xml @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EditorDebuggerSession" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + A class to interact with the editor debugger. + </brief_description> + <description> + This class cannot be directly instantiated and must be retrieved via a [EditorDebuggerPlugin]. + You can add tabs to the session UI via [method add_session_tab], send messages via [method send_message], and toggle [EngineProfiler]s via [method toggle_profiler]. + </description> + <tutorials> + </tutorials> + <methods> + <method name="add_session_tab"> + <return type="void" /> + <param index="0" name="control" type="Control" /> + <description> + Adds the given [param control] to the debug session UI in the debugger bottom panel. + </description> + </method> + <method name="is_active"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the debug session is currently attached to a remote instance. + </description> + </method> + <method name="is_breaked"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the attached remote instance is currently in the debug loop. + </description> + </method> + <method name="is_debuggable"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the attached remote instance can be debugged. + </description> + </method> + <method name="remove_session_tab"> + <return type="void" /> + <param index="0" name="control" type="Control" /> + <description> + Removes the given [param control] from the debug session UI in the debugger bottom panel. + </description> + </method> + <method name="send_message"> + <return type="void" /> + <param index="0" name="message" type="String" /> + <param index="1" name="data" type="Array" default="[]" /> + <description> + Sends the given [param message] to the attached remote instance, optionally passing additionally [param data]. See [EngineDebugger] for how to retrieve those messages. + </description> + </method> + <method name="toggle_profiler"> + <return type="void" /> + <param index="0" name="profiler" type="String" /> + <param index="1" name="enable" type="bool" /> + <param index="2" name="data" type="Array" default="[]" /> + <description> + Toggle the given [param profiler] on the attached remote instance, optionally passing additionally [param data]. See [EngineProfiler] for more details. + </description> + </method> + </methods> + <signals> + <signal name="breaked"> + <param index="0" name="can_debug" type="bool" /> + <description> + Emitted when the attached remote instance enters a break state. If [param can_debug] is [code]true[/code], the remote instance will enter the debug loop. + </description> + </signal> + <signal name="continued"> + <description> + Emitted when the attached remote instance exits a break state. + </description> + </signal> + <signal name="started"> + <description> + Emitted when a remote instance is attached to this session (i.e. the session becomes active). + </description> + </signal> + <signal name="stopped"> + <description> + Emitted when a remote instance is detached from this session (i.e. the session becomes inactive). + </description> + </signal> + </signals> +</class> diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml index bb319cb5a3..5d4b83bc27 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -48,6 +48,12 @@ [b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash. </description> </method> + <method name="get_current_directory" qualifiers="const"> + <return type="String" /> + <description> + Returns the current directory being viewed in the [FileSystemDock]. If a file is selected, its base directory will be returned using [method String.get_base_dir] instead. + </description> + </method> <method name="get_current_path" qualifiers="const"> <return type="String" /> <description> @@ -131,10 +137,10 @@ [b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash. </description> </method> - <method name="get_selected_path" qualifiers="const"> - <return type="String" /> + <method name="get_selected_paths" qualifiers="const"> + <return type="PackedStringArray" /> <description> - Returns the path of the directory currently selected in the [FileSystemDock]. If a file is selected, its base directory will be returned using [method String.get_base_dir] instead. + Returns an array containing the paths of the currently selected files (and directories) in the [FileSystemDock]. </description> </method> <method name="get_selection"> diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml index 24e1a2da7c..3ab13ec5c0 100644 --- a/doc/classes/EditorNode3DGizmoPlugin.xml +++ b/doc/classes/EditorNode3DGizmoPlugin.xml @@ -8,7 +8,7 @@ To use [EditorNode3DGizmoPlugin], register it using the [method EditorPlugin.add_node_3d_gizmo_plugin] method first. </description> <tutorials> - <link title="Node3D gizmo plugins">$DOCS_URL/tutorials/plugins/editor/spatial_gizmos.html</link> + <link title="Node3D gizmo plugins">$DOCS_URL/tutorials/plugins/editor/3d_gizmos.html</link> </tutorials> <methods> <method name="_can_be_hidden" qualifiers="virtual const"> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index 2289a373bf..806588d100 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -415,7 +415,7 @@ </method> <method name="add_debugger_plugin"> <return type="void" /> - <param index="0" name="script" type="Script" /> + <param index="0" name="script" type="EditorDebuggerPlugin" /> <description> Adds a [Script] as debugger plugin to the Debugger. The script must extend [EditorDebuggerPlugin]. </description> @@ -599,7 +599,7 @@ </method> <method name="remove_debugger_plugin"> <return type="void" /> - <param index="0" name="script" type="Script" /> + <param index="0" name="script" type="EditorDebuggerPlugin" /> <description> Removes the debugger plugin with given script from the Debugger. </description> diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml index 2aca19510b..e18bea1f67 100644 --- a/doc/classes/EditorProperty.xml +++ b/doc/classes/EditorProperty.xml @@ -150,7 +150,7 @@ <param index="1" name="pinned" type="bool" /> <description> Emit it if you want to mark (or unmark) the value of a property for being saved regardless of being equal to the default value. - The default value is the one the property will get when the node is just instantiated and can come from an ancestor scene in the inheritance/instancing chain, a script or a builtin class. + The default value is the one the property will get when the node is just instantiated and can come from an ancestor scene in the inheritance/instantiation chain, a script or a builtin class. </description> </signal> <signal name="resource_selected"> diff --git a/doc/classes/EditorUndoRedoManager.xml b/doc/classes/EditorUndoRedoManager.xml index c1e771d653..133ee9db0d 100644 --- a/doc/classes/EditorUndoRedoManager.xml +++ b/doc/classes/EditorUndoRedoManager.xml @@ -110,7 +110,7 @@ <signals> <signal name="history_changed"> <description> - Emitted when the list of actions in any history has changed, either when an action is commited or a history is cleared. + Emitted when the list of actions in any history has changed, either when an action is committed or a history is cleared. </description> </signal> <signal name="version_changed"> diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index 821fae37a6..d583e07f59 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -275,13 +275,16 @@ If [member ProjectSettings.display/window/vsync/vsync_mode] is [code]Disabled[/code], limiting the FPS to a high value that can be consistently reached on the system can reduce input lag compared to an uncapped framerate. Since this works by ensuring the GPU load is lower than 100%, this latency reduction is only effective in GPU-bottlenecked scenarios, not CPU-bottlenecked scenarios. See also [member physics_ticks_per_second] and [member ProjectSettings.application/run/max_fps]. </member> + <member name="max_physics_steps_per_frame" type="int" setter="set_max_physics_steps_per_frame" getter="get_max_physics_steps_per_frame" default="8"> + Controls the maximum number of physics steps that can be simulated each rendered frame. The default value is tuned to avoid "spiral of death" situations where expensive physics simulations trigger more expensive simulations indefinitely. However, the game will appear to slow down if the rendering FPS is less than [code]1 / max_physics_steps_per_frame[/code] of [member physics_ticks_per_second]. This occurs even if [code]delta[/code] is consistently used in physics calculations. To avoid this, increase [member max_physics_steps_per_frame] if you have increased [member physics_ticks_per_second] significantly above its default value. + </member> <member name="physics_jitter_fix" type="float" setter="set_physics_jitter_fix" getter="get_physics_jitter_fix" default="0.5"> Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of the in-game clock and real clock but smooth out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. [b]Note:[/b] For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting [member physics_jitter_fix] to [code]0[/code]. </member> <member name="physics_ticks_per_second" type="int" setter="set_physics_ticks_per_second" getter="get_physics_ticks_per_second" default="60"> The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to [code]60[/code] or above, as Godot doesn't interpolate the physics step. As a result, values lower than [code]60[/code] will look stuttery. This value can be increased to make input more reactive or work around collision tunneling issues, but keep in mind doing so will increase CPU usage. See also [member max_fps] and [member ProjectSettings.physics/common/physics_ticks_per_second]. - [b]Note:[/b] Only 8 physics ticks may be simulated per rendered frame at most. If more than 8 physics ticks have to be simulated per rendered frame to keep up with rendering, the game will appear to slow down (even if [code]delta[/code] is used consistently in physics calculations). Therefore, it is recommended not to increase [member physics_ticks_per_second] above 240. Otherwise, the game will slow down when the rendering framerate goes below 30 FPS. + [b]Note:[/b] Only [member max_physics_steps_per_frame] physics ticks may be simulated per rendered frame at most. If more physics ticks have to be simulated per rendered frame to keep up with rendering, the project will appear to slow down (even if [code]delta[/code] is used consistently in physics calculations). Therefore, it is recommended to also increase [member max_physics_steps_per_frame] if increasing [member physics_ticks_per_second] significantly above its default value. </member> <member name="print_error_messages" type="bool" setter="set_print_error_messages" getter="is_printing_error_messages" default="true"> If [code]false[/code], stops printing error and warning messages to the console and editor Output log. This can be used to hide error and warning messages during unit test suite runs. This property is equivalent to the [member ProjectSettings.application/run/disable_stderr] project setting. diff --git a/doc/classes/FileSystemDock.xml b/doc/classes/FileSystemDock.xml index 5578f449b3..00f5c7ddff 100644 --- a/doc/classes/FileSystemDock.xml +++ b/doc/classes/FileSystemDock.xml @@ -46,7 +46,7 @@ <description> </description> </signal> - <signal name="instance"> + <signal name="instantiate"> <param index="0" name="files" type="PackedStringArray" /> <description> </description> diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml index 86d52ae9be..90a983d28b 100644 --- a/doc/classes/GeometryInstance3D.xml +++ b/doc/classes/GeometryInstance3D.xml @@ -13,6 +13,7 @@ <return type="Variant" /> <param index="0" name="name" type="StringName" /> <description> + Get the value of a shader parameter as set on this instance. </description> </method> <method name="set_custom_aabb"> @@ -27,6 +28,7 @@ <param index="0" name="name" type="StringName" /> <param index="1" name="value" type="Variant" /> <description> + Set the value of a shader parameter for this instance only. </description> </method> </methods> @@ -45,8 +47,11 @@ [b]Note:[/b] Lights' bake mode will also affect the global illumination rendering. See [member Light3D.light_bake_mode]. </member> <member name="ignore_occlusion_culling" type="bool" setter="set_ignore_occlusion_culling" getter="is_ignoring_occlusion_culling" default="false"> + If [code]true[/code], disables occlusion culling for this instance. Useful for gizmos that must be rendered even when occlusion culling is in use. </member> <member name="lod_bias" type="float" setter="set_lod_bias" getter="get_lod_bias" default="1.0"> + Changes how quickly the mesh transitions to a lower level of detail. A value of 0 will force the mesh to its lowest level of detail, a value of 1 will use the default settings, and larger values will keep the mesh in a higher level of detail at farther distances. + Useful for testing level of detail transitions in the editor. </member> <member name="material_overlay" type="Material" setter="set_material_overlay" getter="get_material_overlay"> The material overlay for the whole geometry. diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index b83bff5d5e..21fb9d139c 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -606,7 +606,7 @@ <return type="void" /> <param index="0" name="group" type="StringName" /> <description> - Removes a node from a group. See notes in the description, and the group methods in [SceneTree]. + Removes a node from the [param group]. Does nothing if the node is not in the [param group]. See notes in the description, and the group methods in [SceneTree]. </description> </method> <method name="replace_by"> @@ -991,7 +991,7 @@ <constant name="DUPLICATE_SCRIPTS" value="4" enum="DuplicateFlags"> Duplicate the node's scripts. </constant> - <constant name="DUPLICATE_USE_INSTANCING" value="8" enum="DuplicateFlags"> + <constant name="DUPLICATE_USE_INSTANTIATION" value="8" enum="DuplicateFlags"> Duplicate using instancing. An instance stays linked to the original so when the original changes, the instance changes too. </constant> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index f4a5288481..ea9b83d2aa 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -467,7 +467,7 @@ <return type="bool" /> <param index="0" name="tag_name" type="String" /> <description> - Returns [code]true[/code] if the feature for the given feature tag is supported in the currently running instance, depending on the platform, build, etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. Refer to the [url=$DOCS_URL/getting_started/workflow/export/feature_tags.html]Feature Tags[/url] documentation for more details. + Returns [code]true[/code] if the feature for the given feature tag is supported in the currently running instance, depending on the platform, build, etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. Refer to the [url=$DOCS_URL/tutorials/export/feature_tags.html]Feature Tags[/url] documentation for more details. [b]Note:[/b] Tag names are case-sensitive. </description> </method> diff --git a/doc/classes/OfflineMultiplayerPeer.xml b/doc/classes/OfflineMultiplayerPeer.xml new file mode 100644 index 0000000000..5e15992d54 --- /dev/null +++ b/doc/classes/OfflineMultiplayerPeer.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="OfflineMultiplayerPeer" inherits="MultiplayerPeer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + A [MultiplayerPeer] which is always connected and acts as a server. + </brief_description> + <description> + This is the default [member MultiplayerAPI.multiplayer_peer] for the [member Node.multiplayer]. It mimics the behavior of a server with no peers connected. + This means that the [SceneTree] will act as the multiplayer authority by default. Calls to [method MultiplayerAPI.is_server] will return [code]true[/code], and calls to [method MultiplayerAPI.get_unique_id] will return [constant MultiplayerPeer.TARGET_PEER_SERVER]. + </description> + <tutorials> + </tutorials> +</class> diff --git a/doc/classes/PathFollow3D.xml b/doc/classes/PathFollow3D.xml index ba7207be8f..fa7580b7b6 100644 --- a/doc/classes/PathFollow3D.xml +++ b/doc/classes/PathFollow3D.xml @@ -9,6 +9,16 @@ </description> <tutorials> </tutorials> + <methods> + <method name="correct_posture" qualifiers="static"> + <return type="Transform3D" /> + <param index="0" name="transform" type="Transform3D" /> + <param index="1" name="rotation_mode" type="int" enum="PathFollow3D.RotationMode" /> + <description> + Correct the [code]transform[/code]. [code]rotation_mode[/code] implicitly specifies how posture (forward, up and sideway direction) is caculated. + </description> + </method> + </methods> <members> <member name="cubic_interp" type="bool" setter="set_cubic_interpolation" getter="get_cubic_interpolation" default="true"> If [code]true[/code], the position between two cached points is interpolated cubically, and linearly otherwise. @@ -30,6 +40,9 @@ <member name="rotation_mode" type="int" setter="set_rotation_mode" getter="get_rotation_mode" enum="PathFollow3D.RotationMode" default="3"> Allows or forbids rotation on one or more axes, depending on the [enum RotationMode] constants being used. </member> + <member name="tilt_enabled" type="bool" setter="set_tilt_enabled" getter="is_tilt_enabled" default="true"> + If [code]true[/code], the tilt property of [Curve3D] takes effect. + </member> <member name="v_offset" type="float" setter="set_v_offset" getter="get_v_offset" default="0.0"> The node's offset perpendicular to the curve. </member> diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml index 59660b4de5..30fa54d669 100644 --- a/doc/classes/PhysicsBody2D.xml +++ b/doc/classes/PhysicsBody2D.xml @@ -25,12 +25,12 @@ </method> <method name="move_and_collide"> <return type="KinematicCollision2D" /> - <param index="0" name="distance" type="Vector2" /> + <param index="0" name="motion" type="Vector2" /> <param index="1" name="test_only" type="bool" default="false" /> <param index="2" name="safe_margin" type="float" default="0.08" /> <param index="3" name="recovery_as_collision" type="bool" default="false" /> <description> - Moves the body along the vector [param distance]. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param distance] should be computed using [code]delta[/code]. + Moves the body along the vector [param motion]. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param motion] should be computed using [code]delta[/code]. Returns a [KinematicCollision2D], which contains information about the collision when stopped, or when touching another body along the motion. If [param test_only] is [code]true[/code], the body does not move but the would-be collision information is given. [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody2D.safe_margin] for more details). @@ -47,13 +47,13 @@ <method name="test_move"> <return type="bool" /> <param index="0" name="from" type="Transform2D" /> - <param index="1" name="distance" type="Vector2" /> + <param index="1" name="motion" type="Vector2" /> <param index="2" name="collision" type="KinematicCollision2D" default="null" /> <param index="3" name="safe_margin" type="float" default="0.08" /> <param index="4" name="recovery_as_collision" type="bool" default="false" /> <description> - Checks for collisions without moving the body. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param distance] should be computed using [code]delta[/code]. - Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [param distance]. Returns [code]true[/code] if a collision would stop the body from moving along the whole path. + Checks for collisions without moving the body. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param motion] should be computed using [code]delta[/code]. + Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [param motion]. Returns [code]true[/code] if a collision would stop the body from moving along the whole path. [param collision] is an optional object of type [KinematicCollision2D], which contains additional information about the collision when stopped, or when touching another body along the motion. [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody2D.safe_margin] for more details). If [param recovery_as_collision] is [code]true[/code], any depenetration from the recovery phase is also reported as a collision; this is useful for checking whether the body would [i]touch[/i] any other bodies. diff --git a/doc/classes/PhysicsBody3D.xml b/doc/classes/PhysicsBody3D.xml index bf7882a1ea..2ef54683f2 100644 --- a/doc/classes/PhysicsBody3D.xml +++ b/doc/classes/PhysicsBody3D.xml @@ -32,13 +32,13 @@ </method> <method name="move_and_collide"> <return type="KinematicCollision3D" /> - <param index="0" name="distance" type="Vector3" /> + <param index="0" name="motion" type="Vector3" /> <param index="1" name="test_only" type="bool" default="false" /> <param index="2" name="safe_margin" type="float" default="0.001" /> <param index="3" name="recovery_as_collision" type="bool" default="false" /> <param index="4" name="max_collisions" type="int" default="1" /> <description> - Moves the body along the vector [param distance]. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param distance] should be computed using [code]delta[/code]. + Moves the body along the vector [param motion]. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param motion] should be computed using [code]delta[/code]. The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision when stopped, or when touching another body along the motion. If [param test_only] is [code]true[/code], the body does not move but the would-be collision information is given. [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody3D.safe_margin] for more details). @@ -64,14 +64,14 @@ <method name="test_move"> <return type="bool" /> <param index="0" name="from" type="Transform3D" /> - <param index="1" name="distance" type="Vector3" /> + <param index="1" name="motion" type="Vector3" /> <param index="2" name="collision" type="KinematicCollision3D" default="null" /> <param index="3" name="safe_margin" type="float" default="0.001" /> <param index="4" name="recovery_as_collision" type="bool" default="false" /> <param index="5" name="max_collisions" type="int" default="1" /> <description> - Checks for collisions without moving the body. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param distance] should be computed using [code]delta[/code]. - Virtually sets the node's position, scale and rotation to that of the given [Transform3D], then tries to move the body along the vector [param distance]. Returns [code]true[/code] if a collision would stop the body from moving along the whole path. + Checks for collisions without moving the body. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param motion] should be computed using [code]delta[/code]. + Virtually sets the node's position, scale and rotation to that of the given [Transform3D], then tries to move the body along the vector [param motion]. Returns [code]true[/code] if a collision would stop the body from moving along the whole path. [param collision] is an optional object of type [KinematicCollision3D], which contains additional information about the collision when stopped, or when touching another body along the motion. [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody3D.safe_margin] for more details). If [param recovery_as_collision] is [code]true[/code], any depenetration from the recovery phase is also reported as a collision; this is useful for checking whether the body would [i]touch[/i] any other bodies. diff --git a/doc/classes/PortableCompressedTexture2D.xml b/doc/classes/PortableCompressedTexture2D.xml index b64cda6df5..693eaafad3 100644 --- a/doc/classes/PortableCompressedTexture2D.xml +++ b/doc/classes/PortableCompressedTexture2D.xml @@ -21,7 +21,7 @@ <param index="3" name="lossy_quality" type="float" default="0.8" /> <description> Initializes the compressed texture from a base image. The compression mode must be provided. - If this image will be used as a normal map, the "normal map" flag is recommended, to ensure optimum quality. + [param normal_map] is recommended to ensure optimum quality if this image will be used as a normal map. If lossy compression is requested, the quality setting can optionally be provided. This maps to Lossy WebP compression quality. </description> </method> diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml index 7a411b27ac..b1c8907d8e 100644 --- a/doc/classes/PrimitiveMesh.xml +++ b/doc/classes/PrimitiveMesh.xml @@ -34,6 +34,9 @@ </method> </methods> <members> + <member name="add_uv2" type="bool" setter="set_add_uv2" getter="get_add_uv2" default="false"> + If set, generates UV2 UV coordinates applying a padding using the [member uv2_padding] setting. UV2 is needed for lightmapping. + </member> <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB(0, 0, 0, 0, 0, 0)"> Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices. </member> @@ -44,5 +47,8 @@ <member name="material" type="Material" setter="set_material" getter="get_material"> The current [Material] of the primitive mesh. </member> + <member name="uv2_padding" type="float" setter="set_uv2_padding" getter="get_uv2_padding" default="2.0"> + If [member add_uv2] is set, specifies the padding in pixels applied along seams of the mesh. If at generation the size of the lightmap texture can't be determined, the UVs are calculated assuming a texture size of 1024x1024. + </member> </members> </class> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 4699131c41..3478215f4f 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -208,7 +208,7 @@ 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). </member> <member name="application/config/custom_user_dir_name" type="String" setter="" getter="" default=""""> - 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]). + This user directory is used for storing persistent data ([code]user://[/code] filesystem). If a custom directory name is defined, this name will be 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. </member> <member name="application/config/description" type="String" setter="" getter="" default=""""> @@ -235,7 +235,8 @@ [b]Note:[/b] Regardless of this setting's value, [code]res://override.cfg[/code] will still be read to override the project settings. </member> <member name="application/config/use_custom_user_dir" type="bool" setter="" getter="" default="false"> - 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]. + If [code]true[/code], the project will save user data to its own user directory. If [member application/config/custom_user_dir_name] is empty, [code]<OS user data directory>/<project name>[/code] directory will be used. If [code]false[/code], the project will save user data to [code]<OS user data directory>/Godot/app_userdata/<project name>[/code]. + See also [url=$DOCS_URL/tutorials/io/data_paths.html#accessing-persistent-user-data-user]File paths in Godot projects[/url]. This setting is only effective on desktop platforms. </member> <member name="application/config/use_hidden_project_data_directory" type="bool" setter="" getter="" default="true"> If [code]true[/code], the project will use a hidden directory ([code].godot[/code]) for storing project-specific data (metadata, shader cache, etc.). @@ -317,11 +318,13 @@ <member name="audio/driver/output_latency.web" type="int" setter="" getter="" default="50"> Safer override for [member audio/driver/output_latency] in the Web platform, to avoid audio issues especially on mobile devices. </member> - <member name="audio/general/2d_panning_strength" type="float" setter="" getter="" default="1.0"> - The base strength of the panning effect for all AudioStreamPlayer2D nodes. The panning strength can be further scaled on each Node using [member AudioStreamPlayer2D.panning_strength]. + <member name="audio/general/2d_panning_strength" type="float" setter="" getter="" default="0.5"> + The base strength of the panning effect for all [AudioStreamPlayer2D] nodes. The panning strength can be further scaled on each Node using [member AudioStreamPlayer2D.panning_strength]. A value of [code]0.0[/code] disables stereo panning entirely, leaving only volume attenuation in place. A value of [code]1.0[/code] completely mutes one of the channels if the sound is located exactly to the left (or right) of the listener. + The default value of [code]0.5[/code] is tuned for headphones. When using speakers, you may find lower values to sound better as speakers have a lower stereo separation compared to headphones. </member> - <member name="audio/general/3d_panning_strength" type="float" setter="" getter="" default="1.0"> - The base strength of the panning effect for all AudioStreamPlayer3D nodes. The panning strength can be further scaled on each Node using [member AudioStreamPlayer3D.panning_strength]. + <member name="audio/general/3d_panning_strength" type="float" setter="" getter="" default="0.5"> + The base strength of the panning effect for all [AudioStreamPlayer3D] nodes. The panning strength can be further scaled on each Node using [member AudioStreamPlayer3D.panning_strength]. A value of [code]0.0[/code] disables stereo panning entirely, leaving only volume attenuation in place. A value of [code]1.0[/code] completely mutes one of the channels if the sound is located exactly to the left (or right) of the listener. + The default value of [code]0.5[/code] is tuned for headphones. When using speakers, you may find lower values to sound better as speakers have a lower stereo separation compared to headphones. </member> <member name="audio/video/video_delay_compensation_ms" type="int" setter="" getter="" default="0"> Setting to hardcode audio delay when playing video. Best to leave this untouched unless you know what you are doing. @@ -555,7 +558,7 @@ Position offset for tooltips, relative to the mouse cursor's hotspot. </member> <member name="display/window/dpi/allow_hidpi" type="bool" setter="" getter="" default="true"> - If [code]true[/code], allows HiDPI display on Windows, macOS, Android, iOS and Web. If [code]false[/code], the platform's low-DPI fallback will be used on HiDPI displays, which causes the window to be displayed in a blurry or pixelated manner (and can cause various window management bugs). Therefore, it is recommended to make your project scale to [url=$DOCS_URL/tutorials/viewports/multiple_resolutions.html]multiple resolutions[/url] instead of disabling this setting. + If [code]true[/code], allows HiDPI display on Windows, macOS, Android, iOS and Web. If [code]false[/code], the platform's low-DPI fallback will be used on HiDPI displays, which causes the window to be displayed in a blurry or pixelated manner (and can cause various window management bugs). Therefore, it is recommended to make your project scale to [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] instead of disabling this setting. [b]Note:[/b] This setting has no effect on Linux as DPI-awareness fallbacks are not supported there. </member> <member name="display/window/energy_saving/keep_screen_on" type="bool" setter="" getter="" default="true"> @@ -1811,6 +1814,10 @@ <member name="physics/common/enable_object_picking" type="bool" setter="" getter="" default="true"> Enables [member Viewport.physics_object_picking] on the root viewport. </member> + <member name="physics/common/max_physics_steps_per_frame" type="int" setter="" getter="" default="8"> + Controls the maximum number of physics steps that can be simulated each rendered frame. The default value is tuned to avoid "spiral of death" situations where expensive physics simulations trigger more expensive simulations indefinitely. However, the game will appear to slow down if the rendering FPS is less than [code]1 / max_physics_steps_per_frame[/code] of [member physics/common/physics_ticks_per_second]. This occurs even if [code]delta[/code] is consistently used in physics calculations. To avoid this, increase [member physics/common/max_physics_steps_per_frame] if you have increased [member physics/common/physics_ticks_per_second] significantly above its default value. + [b]Note:[/b] This property is only read when the project starts. To change the maximum number of simulated physics steps per frame at runtime, set [member Engine.max_physics_steps_per_frame] instead. + </member> <member name="physics/common/physics_jitter_fix" type="float" setter="" getter="" default="0.5"> Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows smoothing out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. [b]Note:[/b] For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting [member physics/common/physics_jitter_fix] to [code]0[/code]. @@ -1819,7 +1826,7 @@ <member name="physics/common/physics_ticks_per_second" type="int" setter="" getter="" default="60"> The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. See also [member application/run/max_fps]. [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_ticks_per_second] instead. - [b]Note:[/b] Only 8 physics ticks may be simulated per rendered frame at most. If more than 8 physics ticks have to be simulated per rendered frame to keep up with rendering, the game will appear to slow down (even if [code]delta[/code] is used consistently in physics calculations). Therefore, it is recommended not to increase [member physics/common/physics_ticks_per_second] above 240. Otherwise, the game will slow down when the rendering framerate goes below 30 FPS. + [b]Note:[/b] Only [member physics/common/max_physics_steps_per_frame] physics ticks may be simulated per rendered frame at most. If more physics ticks have to be simulated per rendered frame to keep up with rendering, the project will appear to slow down (even if [code]delta[/code] is used consistently in physics calculations). Therefore, it is recommended to also increase [member physics/common/max_physics_steps_per_frame] if increasing [member physics/common/physics_ticks_per_second] significantly above its default value. </member> <member name="rendering/2d/sdf/oversize" type="int" setter="" getter="" default="1"> </member> @@ -2016,6 +2023,9 @@ <member name="rendering/lightmapping/bake_quality/ultra_quality_ray_count" type="int" setter="" getter="" default="1024"> The number of rays to use for baking lightmaps with [LightmapGI] when [member LightmapGI.quality] is [constant LightmapGI.BAKE_QUALITY_ULTRA]. </member> + <member name="rendering/lightmapping/primitive_meshes/texel_size" type="float" setter="" getter="" default="0.2"> + The texel_size that is used to calculate the [member Mesh.lightmap_size_hint] on [PrimitiveMesh] resources if [member PrimitiveMesh.add_uv2] is enabled. + </member> <member name="rendering/lightmapping/probe_capture/update_speed" type="float" setter="" getter="" default="15"> The framerate-independent update speed when representing dynamic object lighting from [LightmapProbe]s. Higher values make dynamic object lighting update faster. Higher values can prevent fast-moving objects from having "outdated" indirect lighting displayed on them, at the cost of possible flickering when an object moves from a bright area to a shaded area. </member> @@ -2226,9 +2236,6 @@ <member name="rendering/textures/lossless_compression/force_png" type="bool" setter="" getter="" default="false"> If [code]true[/code], the texture importer will import lossless textures using the PNG format. Otherwise, it will default to using WebP. </member> - <member name="rendering/textures/lossless_compression/webp_compression_level" type="int" setter="" getter="" default="2"> - The default compression level for lossless WebP. Higher levels result in smaller files at the cost of compression speed. Decompression speed is mostly unaffected by the compression level. Supported values are 0 to 9. Note that compression levels above 6 are very slow and offer very little savings. - </member> <member name="rendering/textures/vram_compression/import_bptc" type="bool" setter="" getter="" default="false"> 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 Vulkan renderer. [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/use_hidden_project_data_directory]). @@ -2245,6 +2252,12 @@ 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. [b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/use_hidden_project_data_directory]). </member> + <member name="rendering/textures/webp_compression/compression_method" type="int" setter="" getter="" default="2"> + The default compression method for WebP. Affects both lossy and lossless WebP. A higher value results in smaller files at the cost of compression speed. Decompression speed is mostly unaffected by the compression method. Supported values are 0 to 6. Note that compression methods above 4 are very slow and offer very little savings. + </member> + <member name="rendering/textures/webp_compression/lossless_compression_factor" type="float" setter="" getter="" default="25"> + The default compression factor for lossless WebP. Decompression speed is mostly unaffected by the compression factor. Supported values are 0 to 100. + </member> <member name="rendering/transparent_background" type="bool" setter="" getter="" default="false"> If [code]true[/code], enables [member Viewport.transparent_bg] on the root viewport. This allows per-pixel transparency to be effective after also enabling [member display/window/size/transparent] and [member display/window/per_pixel_transparency/allowed]. </member> diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml index 2de812f5fc..580ce6f382 100644 --- a/doc/classes/RenderingDevice.xml +++ b/doc/classes/RenderingDevice.xml @@ -9,8 +9,8 @@ <methods> <method name="barrier"> <return type="void" /> - <param index="0" name="from" type="int" default="7" /> - <param index="1" name="to" type="int" default="7" /> + <param index="0" name="from" type="int" enum="RenderingDevice.BarrierMask" default="7" /> + <param index="1" name="to" type="int" enum="RenderingDevice.BarrierMask" default="7" /> <description> </description> </method> @@ -19,7 +19,7 @@ <param index="0" name="buffer" type="RID" /> <param index="1" name="offset" type="int" /> <param index="2" name="size_bytes" type="int" /> - <param index="3" name="post_barrier" type="int" default="7" /> + <param index="3" name="post_barrier" type="int" enum="RenderingDevice.BarrierMask" default="7" /> <description> </description> </method> @@ -35,7 +35,7 @@ <param index="1" name="offset" type="int" /> <param index="2" name="size_bytes" type="int" /> <param index="3" name="data" type="PackedByteArray" /> - <param index="4" name="post_barrier" type="int" default="7" /> + <param index="4" name="post_barrier" type="int" enum="RenderingDevice.BarrierMask" default="7" /> <description> </description> </method> @@ -83,7 +83,7 @@ </method> <method name="compute_list_end"> <return type="void" /> - <param index="0" name="post_barrier" type="int" default="7" /> + <param index="0" name="post_barrier" type="int" enum="RenderingDevice.BarrierMask" default="7" /> <description> </description> </method> @@ -223,7 +223,7 @@ </method> <method name="draw_list_end"> <return type="void" /> - <param index="0" name="post_barrier" type="int" default="7" /> + <param index="0" name="post_barrier" type="int" enum="RenderingDevice.BarrierMask" default="7" /> <description> </description> </method> @@ -534,7 +534,7 @@ <param index="3" name="mipmap_count" type="int" /> <param index="4" name="base_layer" type="int" /> <param index="5" name="layer_count" type="int" /> - <param index="6" name="post_barrier" type="int" default="7" /> + <param index="6" name="post_barrier" type="int" enum="RenderingDevice.BarrierMask" default="7" /> <description> </description> </method> @@ -549,7 +549,7 @@ <param index="6" name="dst_mipmap" type="int" /> <param index="7" name="src_layer" type="int" /> <param index="8" name="dst_layer" type="int" /> - <param index="9" name="post_barrier" type="int" default="7" /> + <param index="9" name="post_barrier" type="int" enum="RenderingDevice.BarrierMask" default="7" /> <description> </description> </method> @@ -609,7 +609,7 @@ <return type="int" enum="Error" /> <param index="0" name="from_texture" type="RID" /> <param index="1" name="to_texture" type="RID" /> - <param index="2" name="post_barrier" type="int" default="7" /> + <param index="2" name="post_barrier" type="int" enum="RenderingDevice.BarrierMask" default="7" /> <description> </description> </method> @@ -618,7 +618,7 @@ <param index="0" name="texture" type="RID" /> <param index="1" name="layer" type="int" /> <param index="2" name="data" type="PackedByteArray" /> - <param index="3" name="post_barrier" type="int" default="7" /> + <param index="3" name="post_barrier" type="int" enum="RenderingDevice.BarrierMask" default="7" /> <description> </description> </method> @@ -648,8 +648,9 @@ <param index="0" name="vertex_count" type="int" /> <param index="1" name="vertex_format" type="int" /> <param index="2" name="src_buffers" type="RID[]" /> + <param index="3" name="offsets" type="PackedInt64Array" default="PackedInt64Array()" /> <description> - Creates a vertex array based on the specified buffers. + Creates a vertex array based on the specified buffers. Optionally, [param offsets] (in bytes) may be defined for each buffer. </description> </method> <method name="vertex_buffer_create"> @@ -668,16 +669,6 @@ </method> </methods> <constants> - <constant name="BARRIER_MASK_RASTER" value="1"> - </constant> - <constant name="BARRIER_MASK_COMPUTE" value="2"> - </constant> - <constant name="BARRIER_MASK_TRANSFER" value="4"> - </constant> - <constant name="BARRIER_MASK_ALL" value="7"> - </constant> - <constant name="BARRIER_MASK_NO_BARRIER" value="8"> - </constant> <constant name="DEVICE_TYPE_OTHER" value="0" enum="DeviceType"> Rendering device type does not match any of the other enum values or is unknown. </constant> @@ -1160,6 +1151,16 @@ </constant> <constant name="DATA_FORMAT_MAX" value="218" enum="DataFormat"> </constant> + <constant name="BARRIER_MASK_RASTER" value="1" enum="BarrierMask" is_bitfield="true"> + </constant> + <constant name="BARRIER_MASK_COMPUTE" value="2" enum="BarrierMask" is_bitfield="true"> + </constant> + <constant name="BARRIER_MASK_TRANSFER" value="4" enum="BarrierMask" is_bitfield="true"> + </constant> + <constant name="BARRIER_MASK_ALL_BARRIERS" value="7" enum="BarrierMask" is_bitfield="true"> + </constant> + <constant name="BARRIER_MASK_NO_BARRIER" value="8" enum="BarrierMask" is_bitfield="true"> + </constant> <constant name="TEXTURE_TYPE_1D" value="0" enum="TextureType"> </constant> <constant name="TEXTURE_TYPE_2D" value="1" enum="TextureType"> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 13e5470a56..2ffa4dc50b 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -838,6 +838,8 @@ <method name="create_local_rendering_device" qualifiers="const"> <return type="RenderingDevice" /> <description> + Creates a RenderingDevice that can be used to do draw and compute operations on a separate thread. Cannot draw to the screen nor share data with the global RenderingDevice. + [b]Note:[/b] When using the OpenGL backend or when running in headless mode, this function always returns [code]null[/code]. </description> </method> <method name="decal_create"> @@ -1273,6 +1275,8 @@ <method name="get_rendering_device" qualifiers="const"> <return type="RenderingDevice" /> <description> + Returns the global RenderingDevice. + [b]Note:[/b] When using the OpenGL backend or when running in headless mode, this function always returns [code]null[/code]. </description> </method> <method name="get_rendering_info"> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index b0b4f74b46..53040b2753 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -80,7 +80,7 @@ <method name="c_unescape" qualifiers="const"> <return type="String" /> <description> - Returns a copy of the string with escaped characters replaced by their meanings. Supported escape sequences are [code]\'[/code], [code]\"[/code], [code]\?[/code], [code]\\[/code], [code]\a[/code], [code]\b[/code], [code]\f[/code], [code]\n[/code], [code]\r[/code], [code]\t[/code], [code]\v[/code]. + Returns a copy of the string with escaped characters replaced by their meanings. Supported escape sequences are [code]\'[/code], [code]\"[/code], [code]\\[/code], [code]\a[/code], [code]\b[/code], [code]\f[/code], [code]\n[/code], [code]\r[/code], [code]\t[/code], [code]\v[/code]. [b]Note:[/b] Unlike the GDScript parser, this method doesn't support the [code]\uXXXX[/code] escape sequence. </description> </method> @@ -738,7 +738,7 @@ </description> </method> <method name="split_floats" qualifiers="const"> - <return type="PackedFloat32Array" /> + <return type="PackedFloat64Array" /> <param index="0" name="delimiter" type="String" /> <param index="1" name="allow_empty" type="bool" default="true" /> <description> diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml index 043eeb9a80..b185828577 100644 --- a/doc/classes/TextureButton.xml +++ b/doc/classes/TextureButton.xml @@ -27,19 +27,19 @@ <member name="texture_click_mask" type="BitMap" setter="set_click_mask" getter="get_click_mask"> Pure black and white [BitMap] image to use for click detection. On the mask, white pixels represent the button's clickable area. Use it to create buttons with curved shapes. </member> - <member name="texture_disabled" type="Texture2D" setter="set_disabled_texture" getter="get_disabled_texture"> + <member name="texture_disabled" type="Texture2D" setter="set_texture_disabled" getter="get_texture_disabled"> Texture to display when the node is disabled. See [member BaseButton.disabled]. </member> - <member name="texture_focused" type="Texture2D" setter="set_focused_texture" getter="get_focused_texture"> + <member name="texture_focused" type="Texture2D" setter="set_texture_focused" getter="get_texture_focused"> Texture to display when the node has mouse or keyboard focus. [member texture_focused] is displayed [i]over[/i] the base texture, so a partially transparent texture should be used to ensure the base texture remains visible. A texture that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a fully transparent texture of any size. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. </member> - <member name="texture_hover" type="Texture2D" setter="set_hover_texture" getter="get_hover_texture"> + <member name="texture_hover" type="Texture2D" setter="set_texture_hover" getter="get_texture_hover"> Texture to display when the mouse hovers the node. </member> - <member name="texture_normal" type="Texture2D" setter="set_normal_texture" getter="get_normal_texture"> + <member name="texture_normal" type="Texture2D" setter="set_texture_normal" getter="get_texture_normal"> Texture to display by default, when the node is [b]not[/b] in the disabled, focused, hover or pressed state. </member> - <member name="texture_pressed" type="Texture2D" setter="set_pressed_texture" getter="get_pressed_texture"> + <member name="texture_pressed" type="Texture2D" setter="set_texture_pressed" getter="get_texture_pressed"> Texture to display on mouse down over the node, if the node has keyboard focus and the player presses the Enter key or if the player presses the [member BaseButton.shortcut] key. </member> </members> diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml index 314be9adf8..ae2f8d8dff 100644 --- a/doc/classes/Translation.xml +++ b/doc/classes/Translation.xml @@ -88,6 +88,12 @@ The number [param n] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language. </description> </method> + <method name="get_translated_message_list" qualifiers="const"> + <return type="PackedStringArray" /> + <description> + Returns all the messages (translated text). + </description> + </method> </methods> <members> <member name="locale" type="String" setter="set_locale" getter="get_locale" default=""en""> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 532f6703b2..bf79821e2d 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -293,6 +293,14 @@ Sets language code of column title used for line-breaking and text shaping algorithms, if left empty current locale is used instead. </description> </method> + <method name="set_selected"> + <return type="void" /> + <param index="0" name="item" type="TreeItem" /> + <param index="1" name="column" type="int" /> + <description> + Selects the specified [TreeItem] and column. + </description> + </method> </methods> <members> <member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect" default="false"> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 5590f82336..eb83eb9aa6 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -5,7 +5,8 @@ </brief_description> <description> 2-element structure that can be used to represent positions in 2D space or any other pair of numeric values. - It uses floating-point coordinates. See [Vector2i] for its integer counterpart. + It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option [code]float=64[/code]. + See [Vector2i] for its integer counterpart. [b]Note:[/b] In a boolean context, a Vector2 will evaluate to [code]false[/code] if it's equal to [code]Vector2(0, 0)[/code]. Otherwise, a Vector2 will always evaluate to [code]true[/code]. </description> <tutorials> diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index eab880e57f..fd02e3c530 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -5,7 +5,7 @@ </brief_description> <description> 2-element structure that can be used to represent positions in 2D space or any other pair of numeric values. - It uses integer coordinates and is therefore preferable to [Vector2] when exact precision is required. + It uses integer coordinates and is therefore preferable to [Vector2] when exact precision is required. Note that the values are limited to 32 bits, and unlike [Vector2] this cannot be configured with an engine build option. Use [int] or [PackedInt64Array] if 64-bit values are needed. [b]Note:[/b] In a boolean context, a Vector2i will evaluate to [code]false[/code] if it's equal to [code]Vector2i(0, 0)[/code]. Otherwise, a Vector2i will always evaluate to [code]true[/code]. </description> <tutorials> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 1a2cdfe10e..9005dd3f0c 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -5,7 +5,8 @@ </brief_description> <description> 3-element structure that can be used to represent positions in 3D space or any other triplet of numeric values. - It uses floating-point coordinates. See [Vector3i] for its integer counterpart. + It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option [code]float=64[/code]. + See [Vector3i] for its integer counterpart. [b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 will always evaluate to [code]true[/code]. </description> <tutorials> diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml index 1c2a033f7a..eb64e098ce 100644 --- a/doc/classes/Vector3i.xml +++ b/doc/classes/Vector3i.xml @@ -5,7 +5,7 @@ </brief_description> <description> 3-element structure that can be used to represent positions in 3D space or any other triplet of numeric values. - It uses integer coordinates and is therefore preferable to [Vector3] when exact precision is required. + It uses integer coordinates and is therefore preferable to [Vector3] when exact precision is required. Note that the values are limited to 32 bits, and unlike [Vector3] this cannot be configured with an engine build option. Use [int] or [PackedInt64Array] if 64-bit values are needed. [b]Note:[/b] In a boolean context, a Vector3i will evaluate to [code]false[/code] if it's equal to [code]Vector3i(0, 0, 0)[/code]. Otherwise, a Vector3i will always evaluate to [code]true[/code]. </description> <tutorials> diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml index 662d0bce3a..a2759937c1 100644 --- a/doc/classes/Vector4.xml +++ b/doc/classes/Vector4.xml @@ -5,7 +5,8 @@ </brief_description> <description> 4-element structure that can be used to represent any quadruplet of numeric values. - It uses floating-point coordinates. See [Vector4i] for its integer counterpart. + It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option [code]float=64[/code]. + See [Vector4i] for its integer counterpart. [b]Note:[/b] In a boolean context, a Vector4 will evaluate to [code]false[/code] if it's equal to [code]Vector4(0, 0, 0, 0)[/code]. Otherwise, a Vector4 will always evaluate to [code]true[/code]. </description> <tutorials> diff --git a/doc/classes/Vector4i.xml b/doc/classes/Vector4i.xml index e9ac5b9475..2dc10234ee 100644 --- a/doc/classes/Vector4i.xml +++ b/doc/classes/Vector4i.xml @@ -5,7 +5,7 @@ </brief_description> <description> 4-element structure that can be used to represent 4D grid coordinates or sets of integers. - It uses integer coordinates. See [Vector4] for its floating-point counterpart. + It uses integer coordinates and is therefore preferable to [Vector4] when exact precision is required. Note that the values are limited to 32 bits, and unlike [Vector4] this cannot be configured with an engine build option. Use [int] or [PackedInt64Array] if 64-bit values are needed. </description> <tutorials> </tutorials> diff --git a/doc/classes/XRInterfaceExtension.xml b/doc/classes/XRInterfaceExtension.xml index c6b215daa3..0fe54e947f 100644 --- a/doc/classes/XRInterfaceExtension.xml +++ b/doc/classes/XRInterfaceExtension.xml @@ -141,13 +141,6 @@ Returns [code]true[/code] if this interface has been initialized. </description> </method> - <method name="_notification" qualifiers="virtual"> - <return type="void" /> - <param index="0" name="what" type="int" /> - <description> - Informs the interface of an applicable system notification. - </description> - </method> <method name="_post_draw_viewport" qualifiers="virtual"> <return type="void" /> <param index="0" name="render_target" type="RID" /> diff --git a/doc/classes/float.xml b/doc/classes/float.xml index e3938fb5d5..a196021249 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -28,6 +28,13 @@ </constructor> <constructor name="float"> <return type="float" /> + <param index="0" name="from" type="String" /> + <description> + Converts a [String] to a [float], following the same rules as [method String.to_float]. + </description> + </constructor> + <constructor name="float"> + <return type="float" /> <param index="0" name="from" type="bool" /> <description> Cast a [bool] value to a floating-point value, [code]float(true)[/code] will be equal to 1.0 and [code]float(false)[/code] will be equal to 0.0. diff --git a/doc/classes/int.xml b/doc/classes/int.xml index 65ab5d4656..93fc8386c6 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -54,6 +54,13 @@ </constructor> <constructor name="int"> <return type="int" /> + <param index="0" name="from" type="String" /> + <description> + Converts a [String] to an [int], following the same rules as [method String.to_int]. + </description> + </constructor> + <constructor name="int"> + <return type="int" /> <param index="0" name="from" type="bool" /> <description> Cast a [bool] value to an integer value, [code]int(true)[/code] will be equals to 1 and [code]int(false)[/code] will be equals to 0. |