summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/@GlobalScope.xml512
-rw-r--r--doc/classes/AABB.xml7
-rw-r--r--doc/classes/AStar2D.xml2
-rw-r--r--doc/classes/AStar3D.xml2
-rw-r--r--doc/classes/AcceptDialog.xml2
-rw-r--r--doc/classes/AnimatedTexture.xml1
-rw-r--r--doc/classes/Animation.xml16
-rw-r--r--doc/classes/AnimationPlayer.xml9
-rw-r--r--doc/classes/Area3D.xml6
-rw-r--r--doc/classes/Array.xml22
-rw-r--r--doc/classes/AtlasTexture.xml1
-rw-r--r--doc/classes/AudioStreamGeneratorPlayback.xml2
-rw-r--r--doc/classes/BaseButton.xml19
-rw-r--r--doc/classes/BaseMaterial3D.xml29
-rw-r--r--doc/classes/Basis.xml19
-rw-r--r--doc/classes/BitMap.xml2
-rw-r--r--doc/classes/BoneMap.xml1
-rw-r--r--doc/classes/Button.xml8
-rw-r--r--doc/classes/CPUParticles2D.xml36
-rw-r--r--doc/classes/CPUParticles3D.xml8
-rw-r--r--doc/classes/CallbackTweener.xml3
-rw-r--r--doc/classes/Camera2D.xml18
-rw-r--r--doc/classes/CameraAttributes.xml10
-rw-r--r--doc/classes/CameraTexture.xml1
-rw-r--r--doc/classes/CanvasItem.xml32
-rw-r--r--doc/classes/CanvasLayer.xml1
-rw-r--r--doc/classes/CanvasTexture.xml12
-rw-r--r--doc/classes/CharacterBody2D.xml4
-rw-r--r--doc/classes/CharacterBody3D.xml2
-rw-r--r--doc/classes/CheckBox.xml2
-rw-r--r--doc/classes/CheckButton.xml2
-rw-r--r--doc/classes/ClassDB.xml2
-rw-r--r--doc/classes/CodeEdit.xml6
-rw-r--r--doc/classes/Color.xml32
-rw-r--r--doc/classes/ColorPicker.xml29
-rw-r--r--doc/classes/CompressedCubemap.xml9
-rw-r--r--doc/classes/CompressedCubemapArray.xml9
-rw-r--r--doc/classes/CompressedTexture2D.xml15
-rw-r--r--doc/classes/CompressedTexture2DArray.xml9
-rw-r--r--doc/classes/CompressedTexture3D.xml6
-rw-r--r--doc/classes/CompressedTextureLayered.xml10
-rw-r--r--doc/classes/ConfigFile.xml14
-rw-r--r--doc/classes/ConfirmationDialog.xml4
-rw-r--r--doc/classes/Container.xml4
-rw-r--r--doc/classes/Control.xml45
-rw-r--r--doc/classes/Cubemap.xml5
-rw-r--r--doc/classes/CubemapArray.xml5
-rw-r--r--doc/classes/Curve.xml2
-rw-r--r--doc/classes/Curve2D.xml16
-rw-r--r--doc/classes/CurveTexture.xml1
-rw-r--r--doc/classes/CurveXYZTexture.xml1
-rw-r--r--doc/classes/CylinderShape3D.xml1
-rw-r--r--doc/classes/Dictionary.xml3
-rw-r--r--doc/classes/DirAccess.xml12
-rw-r--r--doc/classes/DirectionalLight2D.xml3
-rw-r--r--doc/classes/DisplayServer.xml276
-rw-r--r--doc/classes/EditorCommandPalette.xml2
-rw-r--r--doc/classes/EditorDebuggerPlugin.xml116
-rw-r--r--doc/classes/EditorDebuggerSession.xml86
-rw-r--r--doc/classes/EditorFeatureProfile.xml13
-rw-r--r--doc/classes/EditorFileDialog.xml3
-rw-r--r--doc/classes/EditorInspector.xml6
-rw-r--r--doc/classes/EditorInspectorPlugin.xml2
-rw-r--r--doc/classes/EditorInterface.xml28
-rw-r--r--doc/classes/EditorNode3DGizmoPlugin.xml2
-rw-r--r--doc/classes/EditorPlugin.xml18
-rw-r--r--doc/classes/EditorProperty.xml1
-rw-r--r--doc/classes/EditorScript.xml1
-rw-r--r--doc/classes/EditorSettings.xml30
-rw-r--r--doc/classes/EditorSpinSlider.xml6
-rw-r--r--doc/classes/EditorUndoRedoManager.xml12
-rw-r--r--doc/classes/Engine.xml6
-rw-r--r--doc/classes/Environment.xml1
-rw-r--r--doc/classes/Expression.xml4
-rw-r--r--doc/classes/FlowContainer.xml14
-rw-r--r--doc/classes/FogMaterial.xml1
-rw-r--r--doc/classes/FontFile.xml7
-rw-r--r--doc/classes/FontVariation.xml1
-rw-r--r--doc/classes/GPUParticles2D.xml12
-rw-r--r--doc/classes/GPUParticles3D.xml8
-rw-r--r--doc/classes/GeometryInstance3D.xml29
-rw-r--r--doc/classes/GradientTexture1D.xml1
-rw-r--r--doc/classes/GradientTexture2D.xml1
-rw-r--r--doc/classes/HTTPRequest.xml2
-rw-r--r--doc/classes/Image.xml41
-rw-r--r--doc/classes/ImageTexture.xml3
-rw-r--r--doc/classes/ImageTexture3D.xml5
-rw-r--r--doc/classes/ImageTextureLayered.xml6
-rw-r--r--doc/classes/ImporterMesh.xml1
-rw-r--r--doc/classes/Input.xml6
-rw-r--r--doc/classes/InputEventMIDI.xml10
-rw-r--r--doc/classes/InputEventScreenTouch.xml3
-rw-r--r--doc/classes/JSON.xml2
-rw-r--r--doc/classes/JavaScriptObject.xml2
-rw-r--r--doc/classes/Label3D.xml2
-rw-r--r--doc/classes/Light3D.xml2
-rw-r--r--doc/classes/LineEdit.xml3
-rw-r--r--doc/classes/LinkButton.xml2
-rw-r--r--doc/classes/Marker3D.xml5
-rw-r--r--doc/classes/MenuBar.xml3
-rw-r--r--doc/classes/Mesh.xml4
-rw-r--r--doc/classes/MeshTexture.xml1
-rw-r--r--doc/classes/MissingNode.xml2
-rw-r--r--doc/classes/MissingResource.xml2
-rw-r--r--doc/classes/MovieWriter.xml4
-rw-r--r--doc/classes/MultiMesh.xml2
-rw-r--r--doc/classes/MultiplayerPeer.xml71
-rw-r--r--doc/classes/MultiplayerPeerExtension.xml14
-rw-r--r--doc/classes/NavigationAgent2D.xml28
-rw-r--r--doc/classes/NavigationAgent3D.xml26
-rw-r--r--doc/classes/Node.xml12
-rw-r--r--doc/classes/Node3D.xml15
-rw-r--r--doc/classes/NodePath.xml2
-rw-r--r--doc/classes/OS.xml30
-rw-r--r--doc/classes/Object.xml27
-rw-r--r--doc/classes/OccluderInstance3D.xml2
-rw-r--r--doc/classes/OmniLight3D.xml1
-rw-r--r--doc/classes/OptionButton.xml2
-rw-r--r--doc/classes/ParticleProcessMaterial.xml6
-rw-r--r--doc/classes/PhysicsDirectBodyState2D.xml2
-rw-r--r--doc/classes/PhysicsDirectBodyState3D.xml2
-rw-r--r--doc/classes/PhysicsTestMotionParameters2D.xml2
-rw-r--r--doc/classes/PhysicsTestMotionParameters3D.xml2
-rw-r--r--doc/classes/PlaceholderCubemap.xml4
-rw-r--r--doc/classes/PlaceholderCubemapArray.xml4
-rw-r--r--doc/classes/PlaceholderMaterial.xml4
-rw-r--r--doc/classes/PlaceholderMesh.xml5
-rw-r--r--doc/classes/PlaceholderTexture2D.xml6
-rw-r--r--doc/classes/PlaceholderTexture2DArray.xml4
-rw-r--r--doc/classes/PlaceholderTexture3D.xml5
-rw-r--r--doc/classes/PlaceholderTextureLayered.xml6
-rw-r--r--doc/classes/Plane.xml6
-rw-r--r--doc/classes/Polygon2D.xml1
-rw-r--r--doc/classes/PopupMenu.xml3
-rw-r--r--doc/classes/PortableCompressedTexture2D.xml3
-rw-r--r--doc/classes/PrimitiveMesh.xml10
-rw-r--r--doc/classes/ProjectSettings.xml104
-rw-r--r--doc/classes/Projection.xml62
-rw-r--r--doc/classes/PropertyTweener.xml8
-rw-r--r--doc/classes/Quaternion.xml22
-rw-r--r--doc/classes/RDPipelineRasterizationState.xml2
-rw-r--r--doc/classes/RandomNumberGenerator.xml3
-rw-r--r--doc/classes/Range.xml28
-rw-r--r--doc/classes/Rect2.xml6
-rw-r--r--doc/classes/RenderingDevice.xml15
-rw-r--r--doc/classes/RenderingServer.xml31
-rw-r--r--doc/classes/Resource.xml58
-rw-r--r--doc/classes/ResourceFormatLoader.xml9
-rw-r--r--doc/classes/ResourceFormatSaver.xml9
-rw-r--r--doc/classes/RichTextLabel.xml17
-rw-r--r--doc/classes/RigidBody2D.xml2
-rw-r--r--doc/classes/RigidBody3D.xml2
-rw-r--r--doc/classes/Script.xml2
-rw-r--r--doc/classes/ScrollBar.xml1
-rw-r--r--doc/classes/ScrollContainer.xml2
-rw-r--r--doc/classes/Shape2D.xml6
-rw-r--r--doc/classes/ShapeCast2D.xml7
-rw-r--r--doc/classes/ShapeCast3D.xml7
-rw-r--r--doc/classes/SkeletonProfile.xml1
-rw-r--r--doc/classes/SkeletonProfileHumanoid.xml1
-rw-r--r--doc/classes/Slider.xml2
-rw-r--r--doc/classes/SpinBox.xml5
-rw-r--r--doc/classes/SpotLight3D.xml2
-rw-r--r--doc/classes/Sprite2D.xml3
-rw-r--r--doc/classes/StandardMaterial3D.xml2
-rw-r--r--doc/classes/StreamPeer.xml8
-rw-r--r--doc/classes/String.xml32
-rw-r--r--doc/classes/StyleBox.xml8
-rw-r--r--doc/classes/StyleBoxFlat.xml3
-rw-r--r--doc/classes/SurfaceTool.xml17
-rw-r--r--doc/classes/SystemFont.xml2
-rw-r--r--doc/classes/TabContainer.xml2
-rw-r--r--doc/classes/TextEdit.xml20
-rw-r--r--doc/classes/TextLine.xml1
-rw-r--r--doc/classes/TextServer.xml26
-rw-r--r--doc/classes/Texture.xml2
-rw-r--r--doc/classes/Texture2D.xml18
-rw-r--r--doc/classes/Texture2DArray.xml3
-rw-r--r--doc/classes/Texture3D.xml16
-rw-r--r--doc/classes/TextureLayered.xml22
-rw-r--r--doc/classes/TextureProgressBar.xml3
-rw-r--r--doc/classes/TileMap.xml2
-rw-r--r--doc/classes/TileSet.xml1
-rw-r--r--doc/classes/TileSetAtlasSource.xml2
-rw-r--r--doc/classes/TileSetSource.xml1
-rw-r--r--doc/classes/Transform2D.xml6
-rw-r--r--doc/classes/Transform3D.xml6
-rw-r--r--doc/classes/Translation.xml6
-rw-r--r--doc/classes/Tree.xml10
-rw-r--r--doc/classes/TreeItem.xml9
-rw-r--r--doc/classes/Tween.xml20
-rw-r--r--doc/classes/VSlider.xml1
-rw-r--r--doc/classes/Vector2.xml6
-rw-r--r--doc/classes/Vector3.xml14
-rw-r--r--doc/classes/Vector4.xml6
-rw-r--r--doc/classes/Vector4i.xml8
-rw-r--r--doc/classes/Viewport.xml26
-rw-r--r--doc/classes/ViewportTexture.xml1
-rw-r--r--doc/classes/VisibleOnScreenEnabler2D.xml7
-rw-r--r--doc/classes/VisualInstance3D.xml11
-rw-r--r--doc/classes/VisualShaderNodeFloatParameter.xml2
-rw-r--r--doc/classes/VisualShaderNodeInput.xml2
-rw-r--r--doc/classes/VisualShaderNodeParameter.xml2
-rw-r--r--doc/classes/VoxelGIData.xml2
-rw-r--r--doc/classes/Window.xml2
-rw-r--r--doc/classes/XRInterface.xml24
-rw-r--r--doc/classes/XRInterfaceExtension.xml9
-rw-r--r--doc/classes/XROrigin3D.xml3
-rw-r--r--doc/classes/XRPose.xml4
-rw-r--r--doc/classes/XRServer.xml6
-rw-r--r--doc/classes/float.xml21
-rw-r--r--doc/classes/int.xml29
212 files changed, 2060 insertions, 930 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 6e9e82bbf0..ed404ea504 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -16,7 +16,7 @@
<return type="Variant" />
<param index="0" name="x" type="Variant" />
<description>
- Returns the absolute value of a [Variant] parameter [param x] (i.e. non-negative value). Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
+ Returns the absolute value of a [Variant] parameter [param x] (i.e. non-negative value). Variant types [int], [float], [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
[codeblock]
var a = abs(-1)
# a is 1
@@ -114,7 +114,7 @@
<param index="3" name="end" type="float" />
<param index="4" name="t" type="float" />
<description>
- Returns the point at the given [param t] on a one-dimnesional [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by the given [param control_1], [param control_2], and [param end] points.
+ Returns the point at the given [param t] on a one-dimensional [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bezier curve[/url] defined by the given [param control_1], [param control_2], and [param end] points.
</description>
</method>
<method name="bytes_to_var">
@@ -143,7 +143,7 @@
i = ceil(1.001) # i is 2.0
[/codeblock]
See also [method floor], [method round], and [method snapped].
- [b]Note:[/b] For better type safety, you can use [method ceilf], [method ceili], [method Vector2.ceil], [method Vector3.ceil] or [method Vector4.ceil] instead.
+ [b]Note:[/b] For better type safety, see [method ceilf], [method ceili], [method Vector2.ceil], [method Vector3.ceil] and [method Vector4.ceil].
</description>
</method>
<method name="ceilf">
@@ -151,7 +151,7 @@
<param index="0" name="x" type="float" />
<description>
Rounds [param x] upward (towards positive infinity), returning the smallest whole number that is not less than [param x].
- A type-safe version of [method ceil], specialzied in floats.
+ A type-safe version of [method ceil], returning a [float].
</description>
</method>
<method name="ceili">
@@ -159,7 +159,7 @@
<param index="0" name="x" type="float" />
<description>
Rounds [param x] upward (towards positive infinity), returning the smallest whole number that is not less than [param x].
- A type-safe version of [method ceil] that returns integer.
+ A type-safe version of [method ceil], returning an [int].
</description>
</method>
<method name="clamp">
@@ -168,7 +168,7 @@
<param index="1" name="min" type="Variant" />
<param index="2" name="max" type="Variant" />
<description>
- Clamps the [Variant] [param value] and returns a value not less than [param min] and not more than [param max]. Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
+ Clamps the [param value], returning a [Variant] not less than [param min] and not more than [param max]. Variant types [int], [float], [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
[codeblock]
var a = clamp(-10, -1, 5)
# a is -1
@@ -196,15 +196,13 @@
<param index="1" name="min" type="float" />
<param index="2" name="max" type="float" />
<description>
- Clamps the float [param value] and returns a value not less than [param min] and not more than [param max].
+ Clamps the [param value], returning a [float] not less than [param min] and not more than [param max].
[codeblock]
var speed = 42.1
- # a is 20.0
- var a = clampf(speed, 1.0, 20.0)
+ var a = clampf(speed, 1.0, 20.5) # a is 20.5
speed = -10.0
- # a is -1.0
- a = clampf(speed, -1.0, 1.0)
+ var b = clampf(speed, -1.0, 1.0) # b is -1.0
[/codeblock]
</description>
</method>
@@ -214,15 +212,13 @@
<param index="1" name="min" type="int" />
<param index="2" name="max" type="int" />
<description>
- Clamps the integer [param value] and returns a value not less than [param min] and not more than [param max].
+ Clamps the [param value], returning an [int] not less than [param min] and not more than [param max].
[codeblock]
var speed = 42
- # a is 20
- var a = clampi(speed, 1, 20)
+ var a = clampi(speed, 1, 20) # a is 20
speed = -10
- # a is -1
- a = clampi(speed, -1, 1)
+ var b = clampi(speed, -1, 1) # b is -1
[/codeblock]
</description>
</method>
@@ -244,8 +240,7 @@
<description>
Returns the hyperbolic cosine of [param x] in radians.
[codeblock]
- # Prints 1.543081
- print(cosh(1))
+ print(cosh(1)) # Prints 1.543081
[/codeblock]
</description>
</method>
@@ -257,7 +252,7 @@
<param index="3" name="post" type="float" />
<param index="4" name="weight" type="float" />
<description>
- Cubic interpolates between two values by the factor defined in [param weight] with pre and post values.
+ Cubic interpolates between two values by the factor defined in [param weight] with [param pre] and [param post] values.
</description>
</method>
<method name="cubic_interpolate_angle">
@@ -268,7 +263,7 @@
<param index="3" name="post" type="float" />
<param index="4" name="weight" type="float" />
<description>
- Cubic interpolates between two rotation values with shortest path by the factor defined in [param weight] with pre and post values. See also [method lerp_angle].
+ Cubic interpolates between two rotation values with shortest path by the factor defined in [param weight] with [param pre] and [param post] values. See also [method lerp_angle].
</description>
</method>
<method name="cubic_interpolate_angle_in_time">
@@ -282,7 +277,7 @@
<param index="6" name="pre_t" type="float" />
<param index="7" name="post_t" type="float" />
<description>
- Cubic interpolates between two rotation values with shortest path by the factor defined in [param weight] with pre and post values. See also [method lerp_angle].
+ Cubic interpolates between two rotation values with shortest path by the factor defined in [param weight] with [param pre] and [param post] values. See also [method lerp_angle].
It can perform smoother interpolation than [code]cubic_interpolate()[/code] by the time values.
</description>
</method>
@@ -297,8 +292,8 @@
<param index="6" name="pre_t" type="float" />
<param index="7" name="post_t" type="float" />
<description>
- Cubic interpolates between two values by the factor defined in [param weight] with pre and post values.
- It can perform smoother interpolation than [code]cubic_interpolate()[/code] by the time values.
+ Cubic interpolates between two values by the factor defined in [param weight] with [param pre] and [param post] values.
+ It can perform smoother interpolation than [method cubic_interpolate] by the time values.
</description>
</method>
<method name="db_to_linear">
@@ -314,8 +309,7 @@
<description>
Converts an angle expressed in degrees to radians.
[codeblock]
- # r is 3.141593
- var r = deg_to_rad(180)
+ var r = deg_to_rad(180) # r is 3.141593
[/codeblock]
</description>
</method>
@@ -342,7 +336,13 @@
<return type="String" />
<param index="0" name="error" type="int" />
<description>
- Returns a human-readable name for the given error code.
+ Returns a human-readable name for the given [enum Error] code.
+ [codeblock]
+ print(OK) # Prints 0
+ print(error_string(OK)) # Prints OK
+ print(error_string(ERR_BUSY)) # Prints Busy
+ print(error_string(ERR_OUT_OF_MEMORY)) # Prints Out of memory
+ [/codeblock]
</description>
</method>
<method name="exp">
@@ -363,13 +363,11 @@
<description>
Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x]. Supported types: [int], [float], [Vector2], [Vector3], [Vector4].
[codeblock]
- # a is 2.0
- var a = floor(2.99)
- # a is -3.0
- a = floor(-2.99)
+ var a = floor(2.99) # a is 2.0
+ a = floor(-2.99) # a is -3.0
[/codeblock]
See also [method ceil], [method round], and [method snapped].
- [b]Note:[/b] For better type safety, you can use [method floorf], [method floori], [method Vector2.floor], [method Vector3.floor] or [method Vector4.floor] instead.
+ [b]Note:[/b] For better type safety, see [method floorf], [method floori], [method Vector2.floor], [method Vector3.floor] and [method Vector4.floor].
</description>
</method>
<method name="floorf">
@@ -377,7 +375,7 @@
<param index="0" name="x" type="float" />
<description>
Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x].
- A type-safe version of [method floor], specialzied in floats.
+ A type-safe version of [method floor], returning a [float].
</description>
</method>
<method name="floori">
@@ -385,7 +383,8 @@
<param index="0" name="x" type="float" />
<description>
Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x].
- Equivalent of doing [code]int(x)[/code].
+ A type-safe version of [method floor], returning an [int].
+ [b]Note:[/b] This function is [i]not[/i] the same as [code]int(x)[/code], which rounds towards 0.
</description>
</method>
<method name="fmod">
@@ -393,10 +392,9 @@
<param index="0" name="x" type="float" />
<param index="1" name="y" type="float" />
<description>
- Returns the floating-point remainder of [code]x/y[/code], keeping the sign of [param x].
+ Returns the floating-point remainder of [param x] divided by [param y], keeping the sign of [param x].
[codeblock]
- # Remainder is 1.5
- var remainder = fmod(7, 5.5)
+ var remainder = fmod(7, 5.5) # remainder is 1.5
[/codeblock]
For the integer remainder operation, use the [code]%[/code] operator.
</description>
@@ -406,21 +404,23 @@
<param index="0" name="x" type="float" />
<param index="1" name="y" type="float" />
<description>
- Returns the floating-point modulus of [code]x/y[/code] that wraps equally in positive and negative.
+ Returns the floating-point modulus of [param x] divided by [param y], wrapping equally in positive and negative.
[codeblock]
+ print(" (x) (fmod(x, 1.5)) (fposmod(x, 1.5))")
for i in 7:
- var x = 0.5 * i - 1.5
- print("%4.1f %4.1f %4.1f" % [x, fmod(x, 1.5), fposmod(x, 1.5)])
+ var x = i * 0.5 - 1.5
+ print("%4.1f %4.1f | %4.1f" % [x, fmod(x, 1.5), fposmod(x, 1.5)])
[/codeblock]
Produces:
[codeblock]
- -1.5 -0.0 0.0
- -1.0 -1.0 0.5
- -0.5 -0.5 1.0
- 0.0 0.0 0.0
- 0.5 0.5 0.5
- 1.0 1.0 1.0
- 1.5 0.0 0.0
+ (x) (fmod(x, 1.5)) (fposmod(x, 1.5))
+ -1.5 -0.0 | 0.0
+ -1.0 -1.0 | 0.5
+ -0.5 -0.5 | 1.0
+ 0.0 0.0 | 0.0
+ 0.5 0.5 | 0.5
+ 1.0 1.0 | 1.0
+ 1.5 0.0 | 0.0
[/codeblock]
</description>
</method>
@@ -428,7 +428,7 @@
<return type="int" />
<param index="0" name="variable" type="Variant" />
<description>
- Returns the integer hash of the variable passed.
+ Returns the integer hash of the passed [param variable].
[codeblock]
print(hash("a")) # Prints 177670
[/codeblock]
@@ -438,7 +438,7 @@
<return type="Object" />
<param index="0" name="instance_id" type="int" />
<description>
- Returns the Object that corresponds to [param instance_id]. All Objects have a unique instance ID.
+ Returns the [Object] that corresponds to [param instance_id]. All Objects have a unique instance ID. See also [method Object.get_instance_id].
[codeblock]
var foo = "bar"
func _ready():
@@ -458,12 +458,13 @@
[codeblock]
# The interpolation ratio in the `lerp()` call below is 0.75.
var middle = lerp(20, 30, 0.75)
- # `middle` is now 27.5.
+ # middle is now 27.5.
+
# Now, we pretend to have forgotten the original ratio and want to get it back.
var ratio = inverse_lerp(20, 30, 27.5)
- # `ratio` is now 0.75.
+ # ratio is now 0.75.
[/codeblock]
- See also [method lerp] which performs the reverse of this operation, and [method remap] to map a continuous series of values to another.
+ See also [method lerp], which performs the reverse of this operation, and [method remap] to map a continuous series of values to another.
</description>
</method>
<method name="is_equal_approx">
@@ -472,15 +473,22 @@
<param index="1" name="b" type="float" />
<description>
Returns [code]true[/code] if [param a] and [param b] are approximately equal to each other.
- Here, approximately equal means that [param a] and [param b] are within a small internal epsilon of each other, which scales with the magnitude of the numbers.
+ Here, "approximately equal" means that [param a] and [param b] are within a small internal epsilon of each other, which scales with the magnitude of the numbers.
Infinity values of the same sign are considered equal.
</description>
</method>
+ <method name="is_finite">
+ <return type="bool" />
+ <param index="0" name="x" type="float" />
+ <description>
+ Returns whether [code]x[/code] is a finite value, i.e. it is not [constant @GDScript.NAN], positive infinity, or negative infinity.
+ </description>
+ </method>
<method name="is_inf">
<return type="bool" />
<param index="0" name="x" type="float" />
<description>
- Returns whether [param x] is an infinity value (either positive infinity or negative infinity).
+ Returns [code]true[/code] if [param x] is either positive infinity or negative infinity.
</description>
</method>
<method name="is_instance_id_valid">
@@ -494,14 +502,14 @@
<return type="bool" />
<param index="0" name="instance" type="Variant" />
<description>
- Returns whether [param instance] is a valid object (e.g. has not been deleted from memory).
+ Returns [code]true[/code] if [param instance] is a valid Object (e.g. has not been deleted from memory).
</description>
</method>
<method name="is_nan">
<return type="bool" />
<param index="0" name="x" type="float" />
<description>
- Returns whether [param x] is a NaN ("Not a Number" or invalid) value.
+ Returns [code]true[/code] if [param x] is a NaN ("Not a Number" or invalid) value.
</description>
</method>
<method name="is_zero_approx">
@@ -509,7 +517,7 @@
<param index="0" name="x" type="float" />
<description>
Returns [code]true[/code] if [param x] is zero or almost zero.
- This method is faster than using [method is_equal_approx] with one value as zero.
+ This function is faster than using [method is_equal_approx] with one value as zero.
</description>
</method>
<method name="lerp">
@@ -518,13 +526,13 @@
<param index="1" name="to" type="Variant" />
<param index="2" name="weight" type="Variant" />
<description>
- Linearly interpolates between two values by the factor defined in [param weight]. To perform interpolation, [param weight] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. Use [method clamp] on the result of [method lerp] if this is not desired.
- Both [param from] and [param to] must have matching types. Supported types: [float], [Vector2], [Vector3], [Vector4], [Color], [Quaternion], [Basis].
+ Linearly interpolates between two values by the factor defined in [param weight]. To perform interpolation, [param weight] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. If this is not desired, use [method clamp] on the result of this function.
+ Both [param from] and [param to] must be the same type. Supported types: [float], [Vector2], [Vector3], [Vector4], [Color], [Quaternion], [Basis].
[codeblock]
lerp(0, 4, 0.75) # Returns 3.0
[/codeblock]
See also [method inverse_lerp] which performs the reverse of this operation. To perform eased interpolation with [method lerp], combine it with [method ease] or [method smoothstep]. See also [method remap] to map a continuous series of values to another.
- [b]Note:[/b] For better type safety, you can use [method lerpf], [method Vector2.lerp], [method Vector3.lerp], [method Vector4.lerp], [method Color.lerp], [method Quaternion.slerp] or [method Basis.slerp] instead.
+ [b]Note:[/b] For better type safety, use [method lerpf], [method Vector2.lerp], [method Vector3.lerp], [method Vector4.lerp], [method Color.lerp], [method Quaternion.slerp] or [method Basis.slerp].
</description>
</method>
<method name="lerp_angle">
@@ -533,7 +541,7 @@
<param index="1" name="to" type="float" />
<param index="2" name="weight" type="float" />
<description>
- Linearly interpolates between two angles (in radians) by a normalized value.
+ Linearly interpolates between two angles (in radians) by a [param weight] value between 0.0 and 1.0.
Similar to [method lerp], but interpolates correctly when the angles wrap around [constant @GDScript.TAU]. To perform eased interpolation with [method lerp_angle], combine it with [method ease] or [method smoothstep].
[codeblock]
extends Sprite
@@ -544,7 +552,7 @@
rotation = lerp_angle(min_angle, max_angle, elapsed)
elapsed += delta
[/codeblock]
- [b]Note:[/b] This method lerps through the shortest path between [param from] and [param to]. However, when these two angles are approximately [code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not obvious which way they lerp due to floating-point precision errors. For example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise.
+ [b]Note:[/b] This function lerps through the shortest path between [param from] and [param to]. However, when these two angles are approximately [code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not obvious which way they lerp due to floating-point precision errors. For example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise.
</description>
</method>
<method name="lerpf">
@@ -553,7 +561,7 @@
<param index="1" name="to" type="float" />
<param index="2" name="weight" type="float" />
<description>
- Linearly interpolates between two values by the factor defined in [param weight]. To perform interpolation, [param weight] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i].
+ Linearly interpolates between two values by the factor defined in [param weight]. To perform interpolation, [param weight] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. If this is not desired, use [method clampf] on the result of this function.
[codeblock]
lerp(0, 4, 0.75) # Returns 3.0
[/codeblock]
@@ -564,7 +572,8 @@
<return type="float" />
<param index="0" name="lin" type="float" />
<description>
- Converts from linear energy to decibels (audio). This can be used to implement volume sliders that behave as expected (since volume isn't linear). Example:
+ Converts from linear energy to decibels (audio). This can be used to implement volume sliders that behave as expected (since volume isn't linear).
+ [b]Example:[/b]
[codeblock]
# "Slider" refers to a node that inherits Range such as HSlider or VSlider.
# Its range must be configured to go from 0 to 1.
@@ -577,7 +586,7 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Natural logarithm. The amount of time needed to reach a certain level of continuous growth.
+ Returns the natural logarithm of [param x]. This is the amount of time needed to reach a certain level of continuous growth.
[b]Note:[/b] This is not the same as the "log" function on most calculators, which uses a base 10 logarithm.
[codeblock]
log(10) # Returns 2.302585
@@ -588,7 +597,7 @@
<method name="max" qualifiers="vararg">
<return type="Variant" />
<description>
- Returns the maximum of the given values. This method can take any number of arguments.
+ Returns the maximum of the given values. This function can take any number of arguments.
[codeblock]
max(1, 7, 3, -6, 5) # Returns 7
[/codeblock]
@@ -599,9 +608,9 @@
<param index="0" name="a" type="float" />
<param index="1" name="b" type="float" />
<description>
- Returns the maximum of two float values.
+ Returns the maximum of two [float] values.
[codeblock]
- maxf(3.6, 24) # Returns 24.0
+ maxf(3.6, 24) # Returns 24.0
maxf(-3.99, -4) # Returns -3.99
[/codeblock]
</description>
@@ -611,9 +620,9 @@
<param index="0" name="a" type="int" />
<param index="1" name="b" type="int" />
<description>
- Returns the maximum of two int values.
+ Returns the maximum of two [int] values.
[codeblock]
- maxi(1, 2) # Returns 2
+ maxi(1, 2) # Returns 2
maxi(-3, -4) # Returns -3
[/codeblock]
</description>
@@ -621,7 +630,7 @@
<method name="min" qualifiers="vararg">
<return type="Variant" />
<description>
- Returns the minimum of the given values. This method can take any number of arguments.
+ Returns the minimum of the given values. This function can take any number of arguments.
[codeblock]
min(1, 7, 3, -6, 5) # Returns -6
[/codeblock]
@@ -632,9 +641,9 @@
<param index="0" name="a" type="float" />
<param index="1" name="b" type="float" />
<description>
- Returns the minimum of two float values.
+ Returns the minimum of two [float] values.
[codeblock]
- minf(3.6, 24) # Returns 3.6
+ minf(3.6, 24) # Returns 3.6
minf(-3.99, -4) # Returns -4.0
[/codeblock]
</description>
@@ -644,9 +653,9 @@
<param index="0" name="a" type="int" />
<param index="1" name="b" type="int" />
<description>
- Returns the minimum of two int values.
+ Returns the minimum of two [int] values.
[codeblock]
- mini(1, 2) # Returns 1
+ mini(1, 2) # Returns 1
mini(-3, -4) # Returns -4
[/codeblock]
</description>
@@ -660,8 +669,8 @@
Moves [param from] toward [param to] by the [param delta] value.
Use a negative [param delta] value to move away.
[codeblock]
- move_toward(5, 10, 4) # Returns 9
- move_toward(10, 5, 4) # Returns 6
+ move_toward(5, 10, 4) # Returns 9
+ move_toward(10, 5, 4) # Returns 6
move_toward(10, 5, -1.5) # Returns 11.5
[/codeblock]
</description>
@@ -670,17 +679,17 @@
<return type="int" />
<param index="0" name="value" type="int" />
<description>
- Returns the nearest equal or larger power of 2 for integer [param value].
+ Returns the nearest equal or larger power of 2 for the integer [param value].
In other words, returns the smallest value [code]a[/code] where [code]a = pow(2, n)[/code] such that [code]value &lt;= a[/code] for some non-negative integer [code]n[/code].
[codeblock]
nearest_po2(3) # Returns 4
nearest_po2(4) # Returns 4
nearest_po2(5) # Returns 8
- nearest_po2(0) # Returns 0 (this may not be what you expect)
- nearest_po2(-1) # Returns 0 (this may not be what you expect)
+ nearest_po2(0) # Returns 0 (this may not be expected)
+ nearest_po2(-1) # Returns 0 (this may not be expected)
[/codeblock]
- [b]Warning:[/b] Due to the way it is implemented, this function returns [code]0[/code] rather than [code]1[/code] for non-positive values of [param value] (in reality, 1 is the smallest integer power of 2).
+ [b]Warning:[/b] Due to the way it is implemented, this function returns [code]0[/code] rather than [code]1[/code] for negative values of [param value] (in reality, 1 is the smallest integer power of 2).
</description>
</method>
<method name="pingpong">
@@ -688,18 +697,18 @@
<param index="0" name="value" type="float" />
<param index="1" name="length" type="float" />
<description>
- Returns the [param value] wrapped between [code]0[/code] and the [param length]. If the limit is reached, the next value the function returned is decreased to the [code]0[/code] side or increased to the [param length] side (like a triangle wave). If [param length] is less than zero, it becomes positive.
+ Wraps [param value] between [code]0[/code] and the [param length]. If the limit is reached, the next value the function returns is decreased to the [code]0[/code] side or increased to the [param length] side (like a triangle wave). If [param length] is less than zero, it becomes positive.
[codeblock]
- pingpong(-3.0, 3.0) # Returns 3
- pingpong(-2.0, 3.0) # Returns 2
- pingpong(-1.0, 3.0) # Returns 1
- pingpong(0.0, 3.0) # Returns 0
- pingpong(1.0, 3.0) # Returns 1
- pingpong(2.0, 3.0) # Returns 2
- pingpong(3.0, 3.0) # Returns 3
- pingpong(4.0, 3.0) # Returns 2
- pingpong(5.0, 3.0) # Returns 1
- pingpong(6.0, 3.0) # Returns 0
+ pingpong(-3.0, 3.0) # Returns 3.0
+ pingpong(-2.0, 3.0) # Returns 2.0
+ pingpong(-1.0, 3.0) # Returns 1.0
+ pingpong(0.0, 3.0) # Returns 0.0
+ pingpong(1.0, 3.0) # Returns 1.0
+ pingpong(2.0, 3.0) # Returns 2.0
+ pingpong(3.0, 3.0) # Returns 3.0
+ pingpong(4.0, 3.0) # Returns 2.0
+ pingpong(5.0, 3.0) # Returns 1.0
+ pingpong(6.0, 3.0) # Returns 0.0
[/codeblock]
</description>
</method>
@@ -708,20 +717,22 @@
<param index="0" name="x" type="int" />
<param index="1" name="y" type="int" />
<description>
- Returns the integer modulus of [code]x/y[/code] that wraps equally in positive and negative.
+ Returns the integer modulus of [param x] divided by [param y] that wraps equally in positive and negative.
[codeblock]
+ print("#(i) (i % 3) (posmod(i, 3))")
for i in range(-3, 4):
- print("%2d %2d %2d" % [i, i % 3, posmod(i, 3)])
+ print("%2d %2d | %2d" % [i, i % 3, posmod(i, 3)])
[/codeblock]
Produces:
[codeblock]
- -3 0 0
- -2 -2 1
- -1 -1 2
- 0 0 0
- 1 1 1
- 2 2 2
- 3 0 0
+ (i) (i % 3) (posmod(i, 3))
+ -3 0 | 0
+ -2 -2 | 1
+ -1 -1 | 2
+ 0 0 | 0
+ 1 1 | 1
+ 2 2 | 2
+ 3 0 | 0
[/codeblock]
</description>
</method>
@@ -731,6 +742,7 @@
<param index="1" name="exp" type="float" />
<description>
Returns the result of [param base] raised to the power of [param exp].
+ In GDScript, this is the equivalent of the [code]**[/code] operator.
[codeblock]
pow(2, 5) # Returns 32
[/codeblock]
@@ -743,7 +755,7 @@
var a = [1, 2, 3]
print("a", "b", a) # Prints ab[1, 2, 3]
[/codeblock]
- [b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.
+ [b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print] or [method print_rich]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.
</description>
</method>
<method name="print_rich" qualifiers="vararg">
@@ -771,11 +783,12 @@
</method>
<method name="printraw" qualifiers="vararg">
<description>
- Prints one or more arguments to strings in the best way possible to console. No newline is added at the end.
+ Prints one or more arguments to strings in the best way possible to console. Unlike [method print], no newline is automatically added at the end.
[codeblock]
printraw("A")
printraw("B")
- # Prints AB
+ printraw("C")
+ # Prints ABC
[/codeblock]
[b]Note:[/b] Due to limitations with Godot's built-in console, this only prints to the terminal. If you need to print in the editor, use another method, such as [method print].
</description>
@@ -802,7 +815,7 @@
[codeblock]
push_error("test error") # Prints "test error" to debugger and terminal as error call
[/codeblock]
- [b]Note:[/b] Errors printed this way will not pause project execution. To print an error message and pause project execution in debug builds, use [code]assert(false, "test error")[/code] instead.
+ [b]Note:[/b] This function does not pause project execution. To print an error message and pause project execution in debug builds, use [code]assert(false, "test error")[/code] instead.
</description>
</method>
<method name="push_warning" qualifiers="vararg">
@@ -820,6 +833,8 @@
Converts an angle expressed in radians to degrees.
[codeblock]
rad_to_deg(0.523599) # Returns 30
+ rad_to_deg(PI) # Returns 180
+ rad_to_deg(PI * 2) # Returns 360
[/codeblock]
</description>
</method>
@@ -827,7 +842,14 @@
<return type="PackedInt64Array" />
<param index="0" name="seed" type="int" />
<description>
- Random from seed: pass a [param seed], and an array with both number and new seed is returned. "Seed" here refers to the internal state of the pseudo random number generator. The internal state of the current implementation is 64 bits.
+ Given a [param seed], returns a [PackedInt64Array] of size [code]2[/code], where its first element is the randomized [int] value, and the second element is the same as [param seed]. Passing the same [param seed] consistently returns the same array.
+ [b]Note:[/b] "Seed" here refers to the internal state of the pseudo random number generator, currently implemented as a 64 bit integer.
+ [codeblock]
+ var a = rand_from_seed(4)
+
+ print(a[0]) # Prints 2879024997
+ print(a[1]) # Prints 4
+ [/codeblock]
</description>
</method>
<method name="randf">
@@ -844,9 +866,10 @@
<param index="0" name="from" type="float" />
<param index="1" name="to" type="float" />
<description>
- Returns a random floating point value on the interval between [param from] and [param to] (inclusive).
+ Returns a random floating point value between [param from] and [param to] (inclusive).
[codeblock]
- prints(randf_range(-10, 10), randf_range(-10, 10)) # Prints e.g. -3.844535 7.45315
+ randf_range(0, 20.5) # Returns e.g. 7.45315
+ randf_range(-10, 10) # Returns e.g. -3.844535
[/codeblock]
</description>
</method>
@@ -877,15 +900,15 @@
<description>
Returns a random signed 32-bit integer between [param from] and [param to] (inclusive). If [param to] is lesser than [param from], they are swapped.
[codeblock]
- print(randi_range(0, 1)) # Prints 0 or 1
- print(randi_range(-10, 1000)) # Prints any number from -10 to 1000
+ randi_range(0, 1) # Returns either 0 or 1
+ randi_range(-10, 1000) # Returns random integer between -10 and 1000
[/codeblock]
</description>
</method>
<method name="randomize">
<description>
- Randomizes the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time.
- [b]Note:[/b] This method is called automatically when the project is run. If you need to fix the seed to have reproducible results, use [method seed] to initialize the random number generator.
+ Randomizes the seed (or the internal state) of the random number generator. The current implementation uses a number based on the device's time.
+ [b]Note:[/b] This function is called automatically when the project is run. If you need to fix the seed to have consistent, reproducible results, use [method seed] to initialize the random number generator.
</description>
</method>
<method name="remap">
@@ -896,63 +919,67 @@
<param index="3" name="ostart" type="float" />
<param index="4" name="ostop" type="float" />
<description>
- Maps a [param value] from range [code][istart, istop][/code] to [code][ostart, ostop][/code]. See also [method lerp] and [method inverse_lerp]. If [param value] is outside [code][istart, istop][/code], then the resulting value will also be outside [code][ostart, ostop][/code]. Use [method clamp] on the result of [method remap] if this is not desired.
+ Maps a [param value] from range [code][istart, istop][/code] to [code][ostart, ostop][/code]. See also [method lerp] and [method inverse_lerp]. If [param value] is outside [code][istart, istop][/code], then the resulting value will also be outside [code][ostart, ostop][/code]. If this is not desired, use [method clamp] on the result of this function.
[codeblock]
remap(75, 0, 100, -1, 1) # Returns 0.5
[/codeblock]
- For complex use cases where you need multiple ranges, consider using [Curve] or [Gradient] instead.
+ For complex use cases where multiple ranges are needed, consider using [Curve] or [Gradient] instead.
</description>
</method>
<method name="rid_allocate_id">
<return type="int" />
<description>
- Allocate a unique ID which can be used by the implementation to construct a RID. This is used mainly from native extensions to implement servers.
+ Allocates a unique ID which can be used by the implementation to construct a RID. This is used mainly from native extensions to implement servers.
</description>
</method>
<method name="rid_from_int64">
<return type="RID" />
<param index="0" name="base" type="int" />
<description>
- Create a RID from an int64. This is used mainly from native extensions to build servers.
+ Creates a RID from a [param base]. This is used mainly from native extensions to build servers.
</description>
</method>
<method name="round">
<return type="Variant" />
<param index="0" name="x" type="Variant" />
<description>
- Rounds [param x] to the nearest whole number, with halfway cases rounded away from zero. Supported types: [int], [float], [Vector2], [Vector3], [Vector4].
+ Rounds [param x] to the nearest whole number, with halfway cases rounded away from 0. Supported types: [int], [float], [Vector2], [Vector3], [Vector4].
[codeblock]
round(2.4) # Returns 2
round(2.5) # Returns 3
round(2.6) # Returns 3
[/codeblock]
See also [method floor], [method ceil], and [method snapped].
- [b]Note:[/b] For better type safety, you can use [method roundf], [method roundi], [method Vector2.round], [method Vector3.round] or [method Vector4.round] instead.
+ [b]Note:[/b] For better type safety, use [method roundf], [method roundi], [method Vector2.round], [method Vector3.round] or [method Vector4.round], instead.
</description>
</method>
<method name="roundf">
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Rounds [param x] to the nearest whole number, with halfway cases rounded away from zero.
- A type-safe version of [method round], specialzied in floats.
+ Rounds [param x] to the nearest whole number, with halfway cases rounded away from 0.
+ A type-safe version of [method round], returning a [float].
</description>
</method>
<method name="roundi">
<return type="int" />
<param index="0" name="x" type="float" />
<description>
- Rounds [param x] to the nearest whole number, with halfway cases rounded away from zero.
- A type-safe version of [method round] that returns integer.
+ Rounds [param x] to the nearest whole number, with halfway cases rounded away from 0.
+ A type-safe version of [method round], returning an [int].
</description>
</method>
<method name="seed">
<param index="0" name="base" type="int" />
<description>
- Sets seed for the random number generator.
+ Sets the seed for the random number generator to [param base]. Setting the seed manually can ensure consistent, repeatable results for most random functions.
[codeblock]
- var my_seed = "Godot Rocks"
- seed(my_seed.hash())
+ var my_seed = "Godot Rocks".hash()
+ seed(my_seed)
+ var a = randf() + randi()
+ seed(my_seed)
+ var b = randf() + randi()
+ # a and b are now identical
[/codeblock]
</description>
</method>
@@ -960,7 +987,7 @@
<return type="Variant" />
<param index="0" name="x" type="Variant" />
<description>
- Returns the sign of [param x] as same type of [Variant] as [param x] with each component being -1, 0 and 1 for each negative, zero and positive values respectivelu. Variant types [int], [float] (real), [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
+ Returns the sign of [param x] as same type of [Variant] as [param x] with each component being -1, 0 and 1 for each negative, zero and positive values respectively. Variant types [int], [float], [Vector2], [Vector2i], [Vector3] and [Vector3i] are supported.
[codeblock]
sign(-6.0) # Returns -1
sign(0.0) # Returns 0
@@ -974,11 +1001,11 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
- Returns the sign of [param x] as a float: -1.0 or 1.0. Returns 0.0 if [param x] is 0.
+ Returns the sign of [param x] as a [float]: -1.0 or 1.0. Returns 0.0 if [param x] is 0.0.
[codeblock]
- sign(-6.0) # Returns -1.0
+ sign(-6.5) # Returns -1.0
sign(0.0) # Returns 0.0
- sign(6.0) # Returns 1.0
+ sign(6.5) # Returns 1.0
[/codeblock]
</description>
</method>
@@ -986,7 +1013,7 @@
<return type="int" />
<param index="0" name="x" type="int" />
<description>
- Returns the sign of [param x] as an integer: -1 or 1. Returns 0 if [param x] is 0.
+ Returns the sign of [param x] as an [int]: -1 or 1. Returns 0 if [param x] is 0.
[codeblock]
sign(-6) # Returns -1
sign(0) # Returns 0
@@ -1040,7 +1067,7 @@
<param index="0" name="x" type="float" />
<param index="1" name="step" type="float" />
<description>
- Snaps float value [param x] to a given [param step]. This can also be used to round a floating point number to an arbitrary number of decimals.
+ Snaps the float value [param x] to a given [param step]. This can also be used to round a floating point number to an arbitrary number of decimals.
[codeblock]
snapped(100, 32) # Returns 96
snapped(3.14159, 0.01) # Returns 3.14
@@ -1054,9 +1081,11 @@
<description>
Returns the square root of [param x], where [param x] is a non-negative number.
[codeblock]
- sqrt(9) # Returns 3
+ sqrt(9) # Returns 3
+ sqrt(10.24) # Returns 3.2
+ sqrt(-1) # Returns NaN
[/codeblock]
- [b]Note:[/b] Negative values of [param x] return NaN. If you need negative inputs, use [code]System.Numerics.Complex[/code] in C#.
+ [b]Note:[/b] Negative values of [param x] return NaN ("Not a Number"). in C#, if you need negative inputs, use [code]System.Numerics.Complex[/code].
</description>
</method>
<method name="step_decimals">
@@ -1065,30 +1094,27 @@
<description>
Returns the position of the first non-zero digit, after the decimal point. Note that the maximum return value is 10, which is a design decision in the implementation.
[codeblock]
- # n is 0
- var n = step_decimals(5)
- # n is 4
- n = step_decimals(1.0005)
- # n is 9
- n = step_decimals(0.000000005)
+ var n = step_decimals(5) # n is 0
+ n = step_decimals(1.0005) # n is 4
+ n = step_decimals(0.000000005) # n is 9
[/codeblock]
</description>
</method>
<method name="str" qualifiers="vararg">
<return type="String" />
<description>
- Converts one or more arguments of any type to string in the best way possible.
+ Converts one or more arguments of any [Variant] type to [String] in the best way possible.
</description>
</method>
<method name="str_to_var">
<return type="Variant" />
<param index="0" name="string" type="String" />
<description>
- Converts a formatted [param string] that was returned by [method var_to_str] to the original value.
+ Converts a formatted [param string] that was returned by [method var_to_str] to the original [Variant].
[codeblock]
- var a = '{ "a": 1, "b": 2 }'
- var b = str_to_var(a)
- print(b["a"]) # Prints 1
+ var a = '{ "a": 1, "b": 2 }' # a is a String
+ var b = str_to_var(a) # b is a Dictionary
+ print(b["a"]) # Prints 1
[/codeblock]
</description>
</method>
@@ -1109,7 +1135,7 @@
Returns the hyperbolic tangent of [param x].
[codeblock]
var a = log(2.0) # Returns 0.693147
- tanh(a) # Returns 0.6
+ tanh(a) # Returns 0.6
[/codeblock]
</description>
</method>
@@ -1117,7 +1143,7 @@
<return type="int" />
<param index="0" name="variable" type="Variant" />
<description>
- Returns the internal type of the given Variant object, using the [enum Variant.Type] values.
+ Returns the internal type of the given [param variable], using the [enum Variant.Type] values.
[codeblock]
var json = JSON.new()
json.parse('["a", "b", "c"]')
@@ -1141,19 +1167,19 @@
<return type="PackedByteArray" />
<param index="0" name="variable" type="Variant" />
<description>
- Encodes a [Variant] value to a byte array. Encoding objects is allowed (and can potentially include code). Deserialization can be done with [method bytes_to_var_with_objects].
+ Encodes a [Variant] value to a byte array. Encoding objects is allowed (and can potentially include executable code). Deserialization can be done with [method bytes_to_var_with_objects].
</description>
</method>
<method name="var_to_str">
<return type="String" />
<param index="0" name="variable" type="Variant" />
<description>
- Converts a Variant [param variable] to a formatted string that can later be parsed using [method str_to_var].
+ Converts a [Variant] [param variable] to a formatted [String] that can then be parsed using [method str_to_var].
[codeblock]
a = { "a": 1, "b": 2 }
print(var_to_str(a))
[/codeblock]
- prints
+ Prints:
[codeblock]
{
"a": 1,
@@ -1166,7 +1192,7 @@
<return type="Variant" />
<param index="0" name="obj" type="Variant" />
<description>
- Returns a weak reference to an object, or [code]null[/code] if the argument is invalid.
+ Returns a weak reference to an object, or [code]null[/code] if [param obj] is invalid.
A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it.
</description>
</method>
@@ -1176,9 +1202,8 @@
<param index="1" name="min" type="Variant" />
<param index="2" name="max" type="Variant" />
<description>
- Wraps the [Variant] [param value] between [param min] and [param max].
- Usable for creating loop-alike behavior or infinite surfaces.
- Variant types [int] and [float] (real) are supported. If any of the argument is [float] the result will be [float], otherwise it is [int].
+ Wraps the [Variant] [param value] between [param min] and [param max]. Can be used for creating loop-alike behavior or infinite surfaces.
+ Variant types [int] and [float] are supported. If any of the arguments is [float] this function returns a [float], otherwise it returns an [int].
[codeblock]
var a = wrap(4, 5, 10)
# a is 9 (int)
@@ -1197,8 +1222,7 @@
<param index="1" name="min" type="float" />
<param index="2" name="max" type="float" />
<description>
- Wraps float [param value] between [param min] and [param max].
- Usable for creating loop-alike behavior or infinite surfaces.
+ Wraps the float [param value] between [param min] and [param max]. Can be used for creating loop-alike behavior or infinite surfaces.
[codeblock]
# Infinite loop between 5.0 and 9.9
value = wrapf(value + 0.1, 5.0, 10.0)
@@ -1221,8 +1245,7 @@
<param index="1" name="min" type="int" />
<param index="2" name="max" type="int" />
<description>
- Wraps integer [param value] between [param min] and [param max].
- Usable for creating loop-alike behavior or infinite surfaces.
+ Wraps the integer [param value] between [param min] and [param max]. Can be used for creating loop-alike behavior or infinite surfaces.
[codeblock]
# Infinite loop between 5 and 9
frame = wrapi(frame + 1, 5, 10)
@@ -1283,6 +1306,7 @@
The [Marshalls] singleton.
</member>
<member name="NativeExtensionManager" type="NativeExtensionManager" setter="" getter="">
+ The [NativeExtensionManager] singleton.
</member>
<member name="NavigationMeshGenerator" type="NavigationMeshGenerator" setter="" getter="">
The [NavigationMeshGenerator] singleton.
@@ -1377,8 +1401,10 @@
General horizontal alignment, usually used for [Separator], [ScrollBar], [Slider], etc.
</constant>
<constant name="CLOCKWISE" value="0" enum="ClockDirection">
+ Clockwise rotation. Used by some methods (e.g. [method Image.rotate_90]).
</constant>
<constant name="COUNTERCLOCKWISE" value="1" enum="ClockDirection">
+ Counter-clockwise rotation. Used by some methods (e.g. [method Image.rotate_90]).
</constant>
<constant name="HORIZONTAL_ALIGNMENT_LEFT" value="0" enum="HorizontalAlignment">
Horizontal left alignment, usually for text-derived classes.
@@ -1440,6 +1466,24 @@
<constant name="INLINE_ALIGNMENT_TEXT_MASK" value="12" enum="InlineAlignment">
A bit mask for [code]INLINE_ALIGNMENT_TO_*[/code] alignment constants.
</constant>
+ <constant name="EULER_ORDER_XYZ" value="0" enum="EulerOrder">
+ Specifies that Euler angles should be in XYZ order. When composing, the order is X, Y, Z. When decomposing, the order is reversed, first Z, then Y, and X last.
+ </constant>
+ <constant name="EULER_ORDER_XZY" value="1" enum="EulerOrder">
+ Specifies that Euler angles should be in XZY order. When composing, the order is X, Z, Y. When decomposing, the order is reversed, first Y, then Z, and X last.
+ </constant>
+ <constant name="EULER_ORDER_YXZ" value="2" enum="EulerOrder">
+ Specifies that Euler angles should be in YXZ order. When composing, the order is Y, X, Z. When decomposing, the order is reversed, first Z, then X, and Y last.
+ </constant>
+ <constant name="EULER_ORDER_YZX" value="3" enum="EulerOrder">
+ Specifies that Euler angles should be in YZX order. When composing, the order is Y, Z, X. When decomposing, the order is reversed, first X, then Z, and Y last.
+ </constant>
+ <constant name="EULER_ORDER_ZXY" value="4" enum="EulerOrder">
+ Specifies that Euler angles should be in ZXY order. When composing, the order is Z, X, Y. When decomposing, the order is reversed, first Y, then X, and Z last.
+ </constant>
+ <constant name="EULER_ORDER_ZYX" value="5" enum="EulerOrder">
+ Specifies that Euler angles should be in ZYX order. When composing, the order is Z, Y, X. When decomposing, the order is reversed, first X, then Y, and Z last.
+ </constant>
<constant name="KEY_NONE" value="0" enum="Key">
Enum value which doesn't correspond to any key. This is used to initialize [enum Key] properties with a generic state.
</constant>
@@ -1873,34 +1917,34 @@
/ key.
</constant>
<constant name="KEY_0" value="48" enum="Key">
- Number 0.
+ Number 0 key.
</constant>
<constant name="KEY_1" value="49" enum="Key">
- Number 1.
+ Number 1 key.
</constant>
<constant name="KEY_2" value="50" enum="Key">
- Number 2.
+ Number 2 key.
</constant>
<constant name="KEY_3" value="51" enum="Key">
- Number 3.
+ Number 3 key.
</constant>
<constant name="KEY_4" value="52" enum="Key">
- Number 4.
+ Number 4 key.
</constant>
<constant name="KEY_5" value="53" enum="Key">
- Number 5.
+ Number 5 key.
</constant>
<constant name="KEY_6" value="54" enum="Key">
- Number 6.
+ Number 6 key.
</constant>
<constant name="KEY_7" value="55" enum="Key">
- Number 7.
+ Number 7 key.
</constant>
<constant name="KEY_8" value="56" enum="Key">
- Number 8.
+ Number 8 key.
</constant>
<constant name="KEY_9" value="57" enum="Key">
- Number 9.
+ Number 9 key.
</constant>
<constant name="KEY_COLON" value="58" enum="Key">
: key.
@@ -2260,10 +2304,10 @@
Enum value which doesn't correspond to any mouse button. This is used to initialize [enum MouseButton] properties with a generic state.
</constant>
<constant name="MOUSE_BUTTON_LEFT" value="1" enum="MouseButton">
- Primary mouse button, usually the left button.
+ Primary mouse button, usually assigned to the left button.
</constant>
<constant name="MOUSE_BUTTON_RIGHT" value="2" enum="MouseButton">
- Secondary mouse button, usually the right button.
+ Secondary mouse button, usually assigned to the right button.
</constant>
<constant name="MOUSE_BUTTON_MIDDLE" value="3" enum="MouseButton">
Middle mouse button.
@@ -2281,10 +2325,10 @@
Mouse wheel right button (only present on some mice).
</constant>
<constant name="MOUSE_BUTTON_XBUTTON1" value="8" enum="MouseButton">
- Extra mouse button 1 (only present on some mice).
+ Extra mouse button 1. This is sometimes present, usually to the sides of the mouse.
</constant>
<constant name="MOUSE_BUTTON_XBUTTON2" value="9" enum="MouseButton">
- Extra mouse button 2 (only present on some mice).
+ Extra mouse button 2. This is sometimes present, usually to the sides of the mouse.
</constant>
<constant name="MOUSE_BUTTON_MASK_LEFT" value="1" enum="MouseButton">
Primary mouse button mask, usually for the left button.
@@ -2350,7 +2394,7 @@
Game controller D-pad right button.
</constant>
<constant name="JOY_BUTTON_MISC1" value="15" enum="JoyButton">
- Game controller SDL miscellaneous button. Corresponds to Xbox share button, PS5 microphone button, Nintendo capture button.
+ Game controller SDL miscellaneous button. Corresponds to Xbox share button, PS5 microphone button, Nintendo Switch capture button.
</constant>
<constant name="JOY_BUTTON_PADDLE1" value="16" enum="JoyButton">
Game controller SDL paddle 1 button.
@@ -2372,9 +2416,9 @@
</constant>
<constant name="JOY_BUTTON_MAX" value="128" enum="JoyButton">
The maximum number of game controller buttons supported by the engine. The actual limit may be lower on specific platforms:
- - Android: Up to 36 buttons.
- - Linux: Up to 80 buttons.
- - Windows and macOS: Up to 128 buttons.
+ - [b]Android:[/b] Up to 36 buttons.
+ - [b]Linux:[/b] Up to 80 buttons.
+ - [b]Windows[/b] and [b]macOS:[/b] Up to 128 buttons.
</constant>
<constant name="JOY_AXIS_INVALID" value="-1" enum="JoyAxis">
An invalid game controller axis.
@@ -2461,16 +2505,19 @@
MIDI system reset message. Reset all receivers in the system to power-up status. It should not be sent on power-up itself.
</constant>
<constant name="OK" value="0" enum="Error">
- Methods that return [enum Error] return [constant OK] when no error occurred. Note that many functions don't return an error code but will print error messages to standard output.
- Since [constant OK] has value 0, and all other failure codes are positive integers, it can also be used in boolean checks, e.g.:
+ Methods that return [enum Error] return [constant OK] when no error occurred.
+ Since [constant OK] has value 0, and all other error constants are positive integers, it can also be used in boolean checks.
+ [b]Example:[/b]
[codeblock]
- var err = method_that_returns_error()
- if err != OK:
- print("Failure!")
- # Or, equivalent:
- if err:
- print("Still failing!")
+ var error = method_that_returns_error()
+ if error != OK:
+ printerr("Failure!")
+
+ # Or, alternatively:
+ if error:
+ printerr("Still failing!")
[/codeblock]
+ [b]Note:[/b] Many functions do not return an error code, but will print error messages to standard output.
</constant>
<constant name="FAILED" value="1" enum="Error">
Generic error.
@@ -2608,100 +2655,103 @@
Skip error.
</constant>
<constant name="ERR_HELP" value="46" enum="Error">
- Help error.
+ Help error. Used internally when passing [code]--version[/code] or [code]--help[/code] as executable options.
</constant>
<constant name="ERR_BUG" value="47" enum="Error">
- Bug error.
+ Bug error, caused by an implementation issue in the method.
+ [b]Note:[/b] If a built-in method returns this code, please open an issue on [url=https://github.com/godotengine/godot/issues]the GitHub Issue Tracker[/url].
</constant>
<constant name="ERR_PRINTER_ON_FIRE" value="48" enum="Error">
- Printer on fire error. (This is an easter egg, no engine methods return this error code.)
+ Printer on fire error (This is an easter egg, no built-in methods return this error code).
</constant>
<constant name="PROPERTY_HINT_NONE" value="0" enum="PropertyHint">
- No hint for the edited property.
+ The property has no hint for the editor.
</constant>
<constant name="PROPERTY_HINT_RANGE" value="1" enum="PropertyHint">
- Hints that an integer or float property should be within a range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_less"[/code] to allow manual input going respectively above the max or below the min values. Example: [code]"-360,360,1,or_greater,or_less"[/code].
+ Hints that an [int] or [float] property should be within a range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_less"[/code] to allow manual input going respectively above the max or below the min values.
+ [b]Example:[/b] [code]"-360,360,1,or_greater,or_less"[/code].
Additionally, other keywords can be included: [code]"exp"[/code] for exponential range editing, [code]"radians"[/code] for editing radian angles in degrees, [code]"degrees"[/code] to hint at an angle and [code]"hide_slider"[/code] to hide the slider.
</constant>
<constant name="PROPERTY_HINT_ENUM" value="2" enum="PropertyHint">
- Hints that an integer, float or string property is an enumerated value to pick in a list specified via a hint string.
+ Hints that an [int], [float], or [String] property is an enumerated value to pick in a list specified via a hint string.
The hint string is a comma separated list of names such as [code]"Hello,Something,Else"[/code]. Whitespaces are [b]not[/b] removed from either end of a name. For integer and float properties, the first name in the list has value 0, the next 1, and so on. Explicit values can also be specified by appending [code]:integer[/code] to the name, e.g. [code]"Zero,One,Three:3,Four,Six:6"[/code].
</constant>
<constant name="PROPERTY_HINT_ENUM_SUGGESTION" value="3" enum="PropertyHint">
- Hints that a string property can be an enumerated value to pick in a list specified via a hint string such as [code]"Hello,Something,Else"[/code].
- Unlike [constant PROPERTY_HINT_ENUM] a property with this hint still accepts arbitrary values and can be empty. The list of values serves to suggest possible values.
+ Hints that a [String] property can be an enumerated value to pick in a list specified via a hint string such as [code]"Hello,Something,Else"[/code].
+ Unlike [constant PROPERTY_HINT_ENUM], a property with this hint still accepts arbitrary values and can be empty. The list of values serves to suggest possible values.
</constant>
<constant name="PROPERTY_HINT_EXP_EASING" value="4" enum="PropertyHint">
- Hints that a float property should be edited via an exponential easing function. The hint string can include [code]"attenuation"[/code] to flip the curve horizontally and/or [code]"positive_only"[/code] to exclude in/out easing and limit values to be greater than or equal to zero.
+ Hints that a [float] property should be edited via an exponential easing function. The hint string can include [code]"attenuation"[/code] to flip the curve horizontally and/or [code]"positive_only"[/code] to exclude in/out easing and limit values to be greater than or equal to zero.
</constant>
<constant name="PROPERTY_HINT_LINK" value="5" enum="PropertyHint">
- Hints that a vector property should allow linking values (e.g. to edit both [code]x[/code] and [code]y[/code] together).
+ Hints that a vector property should allow its components to be linked. For example, this allows [member Vector2.x] and [member Vector2.y] to be edited together.
</constant>
<constant name="PROPERTY_HINT_FLAGS" value="6" enum="PropertyHint">
- Hints that an integer property is a bitmask with named bit flags. For example, to allow toggling bits 0, 1, 2 and 4, the hint could be something like [code]"Bit0,Bit1,Bit2,,Bit4"[/code].
+ Hints that an [int] property is a bitmask with named bit flags. For example, to allow toggling bits 0, 1, 2 and 4, the hint could be something like [code]"Bit0,Bit1,Bit2,,Bit4"[/code].
</constant>
<constant name="PROPERTY_HINT_LAYERS_2D_RENDER" value="7" enum="PropertyHint">
- Hints that an integer property is a bitmask using the optionally named 2D render layers.
+ Hints that an [int] property is a bitmask using the optionally named 2D render layers.
</constant>
<constant name="PROPERTY_HINT_LAYERS_2D_PHYSICS" value="8" enum="PropertyHint">
- Hints that an integer property is a bitmask using the optionally named 2D physics layers.
+ Hints that an [int] property is a bitmask using the optionally named 2D physics layers.
</constant>
<constant name="PROPERTY_HINT_LAYERS_2D_NAVIGATION" value="9" enum="PropertyHint">
- Hints that an integer property is a bitmask using the optionally named 2D navigation layers.
+ Hints that an [int] property is a bitmask using the optionally named 2D navigation layers.
</constant>
<constant name="PROPERTY_HINT_LAYERS_3D_RENDER" value="10" enum="PropertyHint">
- Hints that an integer property is a bitmask using the optionally named 3D render layers.
+ Hints that an [int] property is a bitmask using the optionally named 3D render layers.
</constant>
<constant name="PROPERTY_HINT_LAYERS_3D_PHYSICS" value="11" enum="PropertyHint">
- Hints that an integer property is a bitmask using the optionally named 3D physics layers.
+ Hints that an [int] property is a bitmask using the optionally named 3D physics layers.
</constant>
<constant name="PROPERTY_HINT_LAYERS_3D_NAVIGATION" value="12" enum="PropertyHint">
- Hints that an integer property is a bitmask using the optionally named 3D navigation layers.
+ Hints that an [int] property is a bitmask using the optionally named 3D navigation layers.
</constant>
<constant name="PROPERTY_HINT_FILE" value="13" enum="PropertyHint">
- Hints that a string property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code].
+ Hints that a [String] property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code].
</constant>
<constant name="PROPERTY_HINT_DIR" value="14" enum="PropertyHint">
- Hints that a string property is a path to a directory. Editing it will show a file dialog for picking the path.
+ Hints that a [String] property is a path to a directory. Editing it will show a file dialog for picking the path.
</constant>
<constant name="PROPERTY_HINT_GLOBAL_FILE" value="15" enum="PropertyHint">
- Hints that a string property is an absolute path to a file outside the project folder. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code].
+ Hints that a [String] property is an absolute path to a file outside the project folder. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards, like [code]"*.png,*.jpg"[/code].
</constant>
<constant name="PROPERTY_HINT_GLOBAL_DIR" value="16" enum="PropertyHint">
- Hints that a string property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path.
+ Hints that a [String] property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path.
</constant>
<constant name="PROPERTY_HINT_RESOURCE_TYPE" value="17" enum="PropertyHint">
Hints that a property is an instance of a [Resource]-derived type, optionally specified via the hint string (e.g. [code]"Texture2D"[/code]). Editing it will show a popup menu of valid resource types to instantiate.
</constant>
<constant name="PROPERTY_HINT_MULTILINE_TEXT" value="18" enum="PropertyHint">
- Hints that a string property is text with line breaks. Editing it will show a text input field where line breaks can be typed.
+ Hints that a [String] property is text with line breaks. Editing it will show a text input field where line breaks can be typed.
</constant>
<constant name="PROPERTY_HINT_EXPRESSION" value="19" enum="PropertyHint">
- Hints that a string property is an [Expression].
+ Hints that a [String] property is an [Expression].
</constant>
<constant name="PROPERTY_HINT_PLACEHOLDER_TEXT" value="20" enum="PropertyHint">
- Hints that a string property should have a placeholder text visible on its input field, whenever the property is empty. The hint string is the placeholder text to use.
+ Hints that a [String] property should show a placeholder text on its input field, if empty. The hint string is the placeholder text to use.
</constant>
<constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="21" enum="PropertyHint">
- Hints that a color property should be edited without changing its alpha component, i.e. only R, G and B channels are edited.
+ 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.
+ Hints that an image is compressed using lossy compression. The editor does not internally use this property hint.
</constant>
<constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="23" enum="PropertyHint">
- Hints that an image is compressed using lossless compression.
+ 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">
- 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:
+ 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]
[codeblock]
- hint_string = "%s:" % [TYPE_INT] # Array of inteters.
+ hint_string = "%s:" % [TYPE_INT] # Array of integers.
hint_string = "%s:%s:" % [TYPE_ARRAY, TYPE_REAL] # Two-dimensional array of floats.
hint_string = "%s/%s:Resource" % [TYPE_OBJECT, TYPE_OBJECT] # Array of resources.
hint_string = "%s:%s/%s:Resource" % [TYPE_ARRAY, TYPE_OBJECT, TYPE_OBJECT] # Two-dimensional array of resources.
[/codeblock]
- [b]Note:[/b] The final colon is required to specify for properly detecting built-in types.
+ [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>
@@ -2722,6 +2772,7 @@
<constant name="PROPERTY_HINT_PROPERTY_OF_SCRIPT" value="34" 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>
<constant name="PROPERTY_HINT_NODE_PATH_VALID_TYPES" value="36" enum="PropertyHint">
</constant>
@@ -2731,39 +2782,42 @@
</constant>
<constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="39" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_INT_IS_POINTER" value="41" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_INT_IS_POINTER" value="40" enum="PropertyHint">
</constant>
- <constant name="PROPERTY_HINT_ARRAY_TYPE" value="40" enum="PropertyHint">
+ <constant name="PROPERTY_HINT_ARRAY_TYPE" value="41" 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.
+ 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.
+ 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>
<constant name="PROPERTY_HINT_HIDE_QUATERNION_EDIT" value="45" enum="PropertyHint">
- Hints that a quaternion property should disable the temporary euler editor.
+ 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, and every character is replaced with the secret character.
+ 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>
<constant name="PROPERTY_HINT_MAX" value="47" enum="PropertyHint">
+ Represents the size of the [enum PropertyHint] enum.
</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.
</constant>
<constant name="PROPERTY_USAGE_STORAGE" value="2" enum="PropertyUsageFlags">
The property is serialized and saved in the scene file (default).
</constant>
<constant name="PROPERTY_USAGE_EDITOR" value="4" enum="PropertyUsageFlags">
- The property is shown in the editor inspector (default).
+ The property is shown in the [EditorInspector] (default).
</constant>
<constant name="PROPERTY_USAGE_CHECKABLE" value="8" enum="PropertyUsageFlags">
- The property can be checked in the editor inspector.
+ The property can be checked in the [EditorInspector].
</constant>
<constant name="PROPERTY_USAGE_CHECKED" value="16" enum="PropertyUsageFlags">
- The property is checked in the editor inspector.
+ The property is checked in the [EditorInspector].
</constant>
<constant name="PROPERTY_USAGE_INTERNATIONALIZED" value="32" enum="PropertyUsageFlags">
The property is a translatable string.
@@ -2803,8 +2857,10 @@
<constant name="PROPERTY_USAGE_INTERNAL" value="524288" enum="PropertyUsageFlags">
</constant>
<constant name="PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE" value="1048576" enum="PropertyUsageFlags">
+ If the property is a [Resource], a new copy of it is always created when calling [method Node.duplicate] or [method Resource.duplicate].
</constant>
<constant name="PROPERTY_USAGE_HIGH_END_GFX" value="2097152" enum="PropertyUsageFlags">
+ The property is only shown in the editor if modern renderers are supported (GLES3 is excluded).
</constant>
<constant name="PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT" value="4194304" enum="PropertyUsageFlags">
</constant>
@@ -2819,9 +2875,10 @@
<constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="134217728" enum="PropertyUsageFlags">
</constant>
<constant name="PROPERTY_USAGE_READ_ONLY" value="268435456" enum="PropertyUsageFlags">
- The property is read-only in the editor inspector.
+ The property is read-only in the [EditorInspector].
</constant>
<constant name="PROPERTY_USAGE_ARRAY" value="536870912" enum="PropertyUsageFlags">
+ The property is an array.
</constant>
<constant name="PROPERTY_USAGE_DEFAULT" value="6" enum="PropertyUsageFlags">
Default usage (storage, editor and network).
@@ -2845,14 +2902,16 @@
Flag for a virtual method.
</constant>
<constant name="METHOD_FLAG_VARARG" value="16" enum="MethodFlags">
+ Flag for a method with a variable number of arguments.
</constant>
<constant name="METHOD_FLAG_STATIC" value="32" enum="MethodFlags">
+ Flag for a static method.
</constant>
<constant name="METHOD_FLAG_OBJECT_CORE" value="64" enum="MethodFlags">
- Used internally. Allows to not dump core virtuals such as [code]_notification[/code] to the JSON API.
+ Used internally. Allows to not dump core virtual methods (such as [method Object._notification]) to the JSON API.
</constant>
<constant name="METHOD_FLAGS_DEFAULT" value="1" enum="MethodFlags">
- Default method flags.
+ Default method flags (normal).
</constant>
<constant name="TYPE_NIL" value="0" enum="Variant.Type">
Variable is [code]null[/code].
@@ -2864,7 +2923,7 @@
Variable is of type [int].
</constant>
<constant name="TYPE_FLOAT" value="3" enum="Variant.Type">
- Variable is of type [float] (real).
+ Variable is of type [float].
</constant>
<constant name="TYPE_STRING" value="4" enum="Variant.Type">
Variable is of type [String].
@@ -2891,8 +2950,10 @@
Variable is of type [Transform2D].
</constant>
<constant name="TYPE_VECTOR4" value="12" enum="Variant.Type">
+ Variable is of type [Vector4].
</constant>
<constant name="TYPE_VECTOR4I" value="13" enum="Variant.Type">
+ Variable is of type [Vector4i].
</constant>
<constant name="TYPE_PLANE" value="14" enum="Variant.Type">
Variable is of type [Plane].
@@ -2910,6 +2971,7 @@
Variable is of type [Transform3D].
</constant>
<constant name="TYPE_PROJECTION" value="19" enum="Variant.Type">
+ Variable is of type [Projection].
</constant>
<constant name="TYPE_COLOR" value="20" enum="Variant.Type">
Variable is of type [Color].
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index 23dd41f275..ca454cafa3 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -188,6 +188,7 @@
<param index="0" name="from" type="Vector3" />
<param index="1" name="dir" type="Vector3" />
<description>
+ Returns [code]true[/code] if the given ray intersects with this [AABB]. Ray length is infinite.
</description>
</method>
<method name="intersects_segment" qualifiers="const">
@@ -205,6 +206,12 @@
Returns [code]true[/code] if this [AABB] and [param aabb] are approximately equal, by calling [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
+ <method name="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this [AABB] is finite, by calling [method @GlobalScope.is_finite] on each component.
+ </description>
+ </method>
<method name="merge" qualifiers="const">
<return type="AABB" />
<param index="0" name="with" type="AABB" />
diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml
index 6e76df647e..2414b068e6 100644
--- a/doc/classes/AStar2D.xml
+++ b/doc/classes/AStar2D.xml
@@ -271,7 +271,7 @@
<return type="void" />
<param index="0" name="num_nodes" type="int" />
<description>
- Reserves space internally for [param num_nodes] points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity.
+ Reserves space internally for [param num_nodes] points, useful if you're adding a known large number of points at once, such as points on a grid. New capacity must be greater or equals to old capacity.
</description>
</method>
<method name="set_point_disabled">
diff --git a/doc/classes/AStar3D.xml b/doc/classes/AStar3D.xml
index 45b1019bab..4e8394195d 100644
--- a/doc/classes/AStar3D.xml
+++ b/doc/classes/AStar3D.xml
@@ -298,7 +298,7 @@
<return type="void" />
<param index="0" name="num_nodes" type="int" />
<description>
- Reserves space internally for [param num_nodes] points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity.
+ Reserves space internally for [param num_nodes] points. Useful if you're adding a known large number of points at once, such as points on a grid. New capacity must be greater or equals to old capacity.
</description>
</method>
<method name="set_point_disabled">
diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
index b5a1461876..4da9e41ca8 100644
--- a/doc/classes/AcceptDialog.xml
+++ b/doc/classes/AcceptDialog.xml
@@ -62,7 +62,7 @@
Sets autowrapping for the text in the dialog.
</member>
<member name="dialog_close_on_escape" type="bool" setter="set_close_on_escape" getter="get_close_on_escape" default="true">
- If [code]true[/code], the dialog will be hidden when the escape key ([constant @GlobalScope.KEY_ESCAPE]) is pressed.
+ If [code]true[/code], the dialog will be hidden when the escape key ([constant KEY_ESCAPE]) is pressed.
</member>
<member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" default="true">
If [code]true[/code], the dialog is hidden when the OK button is pressed. You can set it to [code]false[/code] if you want to do e.g. input validation when receiving the [signal confirmed] signal, and handle hiding the dialog in your own logic.
diff --git a/doc/classes/AnimatedTexture.xml b/doc/classes/AnimatedTexture.xml
index f0c86ba47b..57a7f86901 100644
--- a/doc/classes/AnimatedTexture.xml
+++ b/doc/classes/AnimatedTexture.xml
@@ -57,6 +57,7 @@
<member name="pause" type="bool" setter="set_pause" getter="get_pause" default="false">
If [code]true[/code], the animation will pause where it currently is (i.e. at [member current_frame]). The animation will continue from where it was paused when changing this property to [code]false[/code].
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
<member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
The animation speed is multiplied by this value. If set to a negative value, the animation is played in reverse.
</member>
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index df0fb11ac7..008296713d 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -26,6 +26,7 @@
[/csharp]
[/codeblocks]
Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] to be played back. Animation tracks have different types, each with its own set of dedicated methods. Check [enum TrackType] to see available types.
+ [b]Note:[/b] 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.
</description>
<tutorials>
<link title="Animation documentation index">$DOCS_URL/tutorials/animation/index.html</link>
@@ -209,6 +210,7 @@
<param index="1" name="time" type="float" />
<param index="2" name="amount" type="float" />
<description>
+ Inserts a key in a given blend shape track. Returns the key index.
</description>
</method>
<method name="clear">
@@ -223,6 +225,8 @@
<param index="1" name="fps" type="int" default="120" />
<param index="2" name="split_tolerance" type="float" default="4.0" />
<description>
+ Compress the animation and all its tracks in-place. This will make [method track_is_compressed] return [code]true[/code] once called on this [Animation]. Compressed tracks require less memory to be played, and are designed to be used for complex 3D animations (such as cutscenes) imported from external 3D software. Compression is lossy, but the difference is usually not noticeable in real world conditions.
+ [b]Note:[/b] Compressed tracks have various limitations (such as not being editable from the editor), so only use compressed animations if you actually need them.
</description>
</method>
<method name="copy_track">
@@ -278,6 +282,7 @@
<param index="1" name="time" type="float" />
<param index="2" name="position" type="Vector3" />
<description>
+ Inserts a key in a given 3D position track. Returns the key index.
</description>
</method>
<method name="remove_track">
@@ -293,6 +298,7 @@
<param index="1" name="time" type="float" />
<param index="2" name="rotation" type="Quaternion" />
<description>
+ Inserts a key in a given 3D rotation track. Returns the key index.
</description>
</method>
<method name="scale_track_insert_key">
@@ -301,6 +307,7 @@
<param index="1" name="time" type="float" />
<param index="2" name="scale" type="Vector3" />
<description>
+ Inserts a key in a given 3D scale track. Returns the key index.
</description>
</method>
<method name="track_find_key" qualifiers="const">
@@ -385,6 +392,7 @@
<return type="bool" />
<param index="0" name="track_idx" type="int" />
<description>
+ Returns [code]true[/code] if the track is compressed, [code]false[/code] otherwise. See also [method compress].
</description>
</method>
<method name="track_is_enabled" qualifiers="const">
@@ -569,15 +577,19 @@
</signals>
<constants>
<constant name="TYPE_VALUE" value="0" enum="TrackType">
- Value tracks set values in node properties, but only those which can be Interpolated.
+ 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.
</constant>
<constant name="TYPE_POSITION_3D" value="1" enum="TrackType">
+ 3D position track (values are stored in [Vector3]s).
</constant>
<constant name="TYPE_ROTATION_3D" value="2" enum="TrackType">
+ 3D rotation track (values are stored in [Quaternion]s).
</constant>
<constant name="TYPE_SCALE_3D" value="3" enum="TrackType">
+ 3D scale track (values are stored in [Vector3]s).
</constant>
<constant name="TYPE_BLEND_SHAPE" value="4" enum="TrackType">
+ Blend shape track.
</constant>
<constant name="TYPE_METHOD" value="5" enum="TrackType">
Method tracks call functions with given arguments per key.
@@ -598,7 +610,7 @@
Linear interpolation.
</constant>
<constant name="INTERPOLATION_CUBIC" value="2" enum="InterpolationType">
- Cubic interpolation.
+ Cubic interpolation. This looks smoother than linear interpolation, but is more expensive to interpolate. Stick to [constant INTERPOLATION_LINEAR] for complex 3D animations imported from external software, even if it requires using a higher animation framerate in return.
</constant>
<constant name="INTERPOLATION_LINEAR_ANGLE" value="3" enum="InterpolationType">
Linear interpolation with shortest path rotation.
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index b7ac1ff7f8..9efd3ac939 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -217,7 +217,7 @@
</member>
<member name="current_animation" type="String" setter="set_current_animation" getter="get_current_animation" default="&quot;&quot;">
The key of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See [method play] for more information on playing animations.
- [b]Note:[/b] while this property appears in the inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation].
+ [b]Note:[/b] While this property appears in the Inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation].
</member>
<member name="current_animation_length" type="float" setter="" getter="get_current_animation_length">
The length (in seconds) of the currently playing animation.
@@ -242,7 +242,7 @@
The process notification in which to update animations.
</member>
<member name="playback_speed" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
- The speed scaling ratio. For instance, if this value is 1, then the animation plays at normal speed. If it's 0.5, then it plays at half speed. If it's 2, then it plays at double speed.
+ The speed scaling ratio. For example, if this value is 1, then the animation plays at normal speed. If it's 0.5, then it plays at half speed. If it's 2, then it plays at double speed.
</member>
<member name="reset_on_save" type="bool" setter="set_reset_on_save_enabled" getter="is_reset_on_save_enabled" default="true">
This is used by the editor. If set to [code]true[/code], the scene will be saved with the effects of the reset animation (the animation with the key [code]"RESET"[/code]) applied as if it had been seeked to time 0, with the editor keeping the values that the scene had before saving.
@@ -268,6 +268,11 @@
[b]Note:[/b] This signal is not emitted if an animation is looping.
</description>
</signal>
+ <signal name="animation_libraries_updated">
+ <description>
+ Notifies when the animation libraries have changed.
+ </description>
+ </signal>
<signal name="animation_list_changed">
<description>
Notifies when an animation list is changed.
diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml
index ce49be9bc1..ea8cab324d 100644
--- a/doc/classes/Area3D.xml
+++ b/doc/classes/Area3D.xml
@@ -110,11 +110,11 @@
<member name="reverb_bus_amount" type="float" setter="set_reverb_amount" getter="get_reverb_amount" default="0.0">
The degree to which this area applies reverb to its associated audio. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision.
</member>
- <member name="reverb_bus_enable" type="bool" setter="set_use_reverb_bus" getter="is_using_reverb_bus" default="false">
+ <member name="reverb_bus_enabled" type="bool" setter="set_use_reverb_bus" getter="is_using_reverb_bus" default="false">
If [code]true[/code], the area applies reverb to its associated audio.
</member>
- <member name="reverb_bus_name" type="StringName" setter="set_reverb_bus" getter="get_reverb_bus" default="&amp;&quot;Master&quot;">
- The reverb bus name to use for this area's associated audio.
+ <member name="reverb_bus_name" type="StringName" setter="set_reverb_bus_name" getter="get_reverb_bus_name" default="&amp;&quot;Master&quot;">
+ The name of the reverb bus to use for this area's associated audio.
</member>
<member name="reverb_bus_uniformity" type="float" setter="set_reverb_uniformity" getter="get_reverb_uniformity" default="0.0">
The degree to which this area's reverb is a uniform effect. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision.
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 047089c917..2ec37651f7 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -58,6 +58,7 @@
<param index="2" name="class_name" type="StringName" />
<param index="3" name="script" type="Variant" />
<description>
+ Creates a typed array from the [param base] array. The base array can't be already typed. See [method set_typed] for more details.
</description>
</constructor>
<constructor name="Array">
@@ -271,6 +272,7 @@
array.Fill(0); // Initialize the 10 elements to 0.
[/csharp]
[/codeblocks]
+ [b]Note:[/b] If [param value] is of a reference type ([Object]-derived, [Array], [Dictionary], etc.) then the array is filled with the references to the same object, i.e. no duplicates are created.
</description>
</method>
<method name="filter" qualifiers="const">
@@ -315,16 +317,19 @@
<method name="get_typed_builtin" qualifiers="const">
<return type="int" />
<description>
+ Returns the [enum Variant.Type] constant for a typed array. If the [Array] is not typed, returns [constant TYPE_NIL].
</description>
</method>
<method name="get_typed_class_name" qualifiers="const">
<return type="StringName" />
<description>
+ Returns a class name of a typed [Array] of type [constant TYPE_OBJECT].
</description>
</method>
<method name="get_typed_script" qualifiers="const">
<return type="Variant" />
<description>
+ Returns the script associated with a typed array tied to a class name.
</description>
</method>
<method name="has" qualifiers="const">
@@ -348,7 +353,6 @@
GD.Print(arr.Contains("7")); // False
[/csharp]
[/codeblocks]
-
[b]Note:[/b] This is equivalent to using the [code]in[/code] operator as follows:
[codeblocks]
[gdscript]
@@ -393,11 +397,13 @@
<method name="is_read_only" qualifiers="const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if the array is read-only. See [method set_read_only]. Arrays are automatically read-only if declared with [code]const[/code] keyword.
</description>
</method>
<method name="is_typed" qualifiers="const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if the array is typed. Typed arrays can only store elements of their associated type and provide type safety for the [code][][/code] operator. Methods of typed array still return [Variant].
</description>
</method>
<method name="map" qualifiers="const">
@@ -429,6 +435,16 @@
Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.
</description>
</method>
+ <method name="pick_random" qualifiers="const">
+ <return type="Variant" />
+ <description>
+ Returns a random value from the target array.
+ [codeblock]
+ var array: Array[int] = [1, 2, 3, 4]
+ print(array.pick_random()) # Prints either of the four numbers.
+ [/codeblock]
+ </description>
+ </method>
<method name="pop_at">
<return type="Variant" />
<param index="0" name="position" type="int" />
@@ -517,6 +533,7 @@
<return type="void" />
<param index="0" name="enable" type="bool" />
<description>
+ Makes the [Array] read-only, i.e. disabled modifying of the array's elements. Does not apply to nested content, e.g. content of nested arrays.
</description>
</method>
<method name="set_typed">
@@ -525,6 +542,8 @@
<param index="1" name="class_name" type="StringName" />
<param index="2" name="script" type="Variant" />
<description>
+ Makes the [Array] typed. The [param type] should be one of the [enum Variant.Type] constants. [param class_name] is optional and can only be provided for [constant TYPE_OBJECT]. [param script] can only be provided if [param class_name] is not empty.
+ The method fails if an array is already typed.
</description>
</method>
<method name="shuffle">
@@ -610,6 +629,7 @@
<return type="bool" />
<param index="0" name="array" type="Array" />
<description>
+ Assigns a different [Array] to this array reference. It the array is typed, the new array's type must be compatible and its elements will be automatically converted.
</description>
</method>
</methods>
diff --git a/doc/classes/AtlasTexture.xml b/doc/classes/AtlasTexture.xml
index 809d983a9d..fc75459e46 100644
--- a/doc/classes/AtlasTexture.xml
+++ b/doc/classes/AtlasTexture.xml
@@ -23,5 +23,6 @@
<member name="region" type="Rect2" setter="set_region" getter="get_region" default="Rect2(0, 0, 0, 0)">
The region used to draw the [member atlas].
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
</members>
</class>
diff --git a/doc/classes/AudioStreamGeneratorPlayback.xml b/doc/classes/AudioStreamGeneratorPlayback.xml
index 1c02dbd3ce..c16198c5c6 100644
--- a/doc/classes/AudioStreamGeneratorPlayback.xml
+++ b/doc/classes/AudioStreamGeneratorPlayback.xml
@@ -27,7 +27,7 @@
<method name="get_frames_available" qualifiers="const">
<return type="int" />
<description>
- Returns the number of audio data frames left to play. If this returned number reaches [code]0[/code], the audio will stop playing until frames are added again. Therefore, make sure your script can always generate and push new audio frames fast enough to avoid audio cracking.
+ Returns the number of frames that can be pushed to the audio sample data buffer without overflowing it. If the result is [code]0[/code], the buffer is full.
</description>
</method>
<method name="get_skips" qualifiers="const">
diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml
index 629675132a..c92e39e08a 100644
--- a/doc/classes/BaseButton.xml
+++ b/doc/classes/BaseButton.xml
@@ -44,37 +44,38 @@
</method>
</methods>
<members>
- <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="BaseButton.ActionMode">
+ <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="BaseButton.ActionMode" default="1">
Determines when the button is considered clicked, one of the [enum ActionMode] constants.
</member>
<member name="button_group" type="ButtonGroup" setter="set_button_group" getter="get_button_group">
The [ButtonGroup] associated with the button. Not to be confused with node groups.
</member>
- <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButton">
+ <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButton" default="1">
Binary mask to choose which mouse buttons this button will respond to.
To allow both left-click and right-click, use [code]MOUSE_BUTTON_MASK_LEFT | MOUSE_BUTTON_MASK_RIGHT[/code].
</member>
- <member name="button_pressed" type="bool" setter="set_pressed" getter="is_pressed">
+ <member name="button_pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if [member toggle_mode] is active). Only works if [member toggle_mode] is [code]true[/code].
[b]Note:[/b] Setting [member button_pressed] will result in [signal toggled] to be emitted. If you want to change the pressed state without emitting that signal, use [method set_pressed_no_signal].
</member>
- <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled">
+ <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
If [code]true[/code], the button is in disabled state and can't be clicked or toggled.
</member>
- <member name="keep_pressed_outside" type="bool" setter="set_keep_pressed_outside" getter="is_keep_pressed_outside">
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
+ <member name="keep_pressed_outside" type="bool" setter="set_keep_pressed_outside" getter="is_keep_pressed_outside" default="false">
If [code]true[/code], the button stays pressed when moving the cursor outside the button while pressing it.
[b]Note:[/b] This property only affects the button's visual appearance. Signals will be emitted at the same moment regardless of this property's value.
</member>
<member name="shortcut" type="Shortcut" setter="set_shortcut" getter="get_shortcut">
[Shortcut] associated to the button.
</member>
- <member name="shortcut_context" type="Node" setter="set_shortcut_context" getter="get_shortcut_context">
- The [Node] which must be a parent of the focused GUI [Control] for the shortcut to be activated. If [code]null[/code], the shortcut can be activated when any control is focused (a global shortcut). This allows shortcuts to be accepted only when the user has a certain area of the GUI focused.
+ <member name="shortcut_feedback" type="bool" setter="set_shortcut_feedback" getter="is_shortcut_feedback" default="true">
+ If [code]true[/code], the button will appear pressed when its shortcut is activated. If [code]false[/code] and [member toggle_mode] is [code]false[/code], the shortcut will activate the button without appearing to press the button.
</member>
- <member name="shortcut_in_tooltip" type="bool" setter="set_shortcut_in_tooltip" getter="is_shortcut_in_tooltip_enabled">
+ <member name="shortcut_in_tooltip" type="bool" setter="set_shortcut_in_tooltip" getter="is_shortcut_in_tooltip_enabled" default="true">
If [code]true[/code], the button will add information about its shortcut in the tooltip.
</member>
- <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode">
+ <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" default="false">
If [code]true[/code], the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked.
</member>
</members>
diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml
index cbb58a3e1e..fbb31cadcd 100644
--- a/doc/classes/BaseMaterial3D.xml
+++ b/doc/classes/BaseMaterial3D.xml
@@ -115,7 +115,7 @@
The color used by the backlight effect. Represents the light passing through an object.
</member>
<member name="backlight_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
- If [code]true[/code], the backlight effect is enabled.
+ If [code]true[/code], the backlight effect is enabled. See also [member subsurf_scatter_transmittance_enabled].
</member>
<member name="backlight_texture" type="Texture2D" setter="set_texture" getter="get_texture">
Texture used to control the backlight effect per-pixel. Added to [member backlight].
@@ -289,6 +289,7 @@
[b]Note:[/b] If [member detail_enabled] is [code]true[/code], the [member detail_albedo] texture is drawn [i]below[/i] the [member normal_texture]. To display a normal map [i]above[/i] the [member detail_albedo] texture, use [member detail_normal] instead.
</member>
<member name="orm_texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ The Occlusion/Roughness/Metallic texture to use. This is a more efficient replacement of [member ao_texture], [member roughness_texture] and [member metallic_texture] in [ORMMaterial3D]. Ambient occlusion is stored in the red channel. Roughness map is stored in the green channel. Metallic map is stored in the blue channel. The alpha channel is ignored.
</member>
<member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames">
The number of horizontal frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member billboard_mode].
@@ -305,7 +306,7 @@
<member name="proximity_fade_distance" type="float" setter="set_proximity_fade_distance" getter="get_proximity_fade_distance" default="1.0">
Distance over which the fade effect takes place. The larger the distance the longer it takes for an object to fade.
</member>
- <member name="proximity_fade_enable" type="bool" setter="set_proximity_fade" getter="is_proximity_fade_enabled" default="false">
+ <member name="proximity_fade_enabled" type="bool" setter="set_proximity_fade_enabled" getter="is_proximity_fade_enabled" default="false">
If [code]true[/code], the proximity fade effect is enabled. The proximity fade effect fades out each pixel based on its distance to another object.
</member>
<member name="refraction_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
@@ -350,13 +351,13 @@
</member>
<member name="specular_mode" type="int" setter="set_specular_mode" getter="get_specular_mode" enum="BaseMaterial3D.SpecularMode" default="0">
The method for rendering the specular blob. See [enum SpecularMode].
- [b]Note:[/b] Only applies to the specular blob. Does not affect specular reflections from the Sky, SSR, or ReflectionProbes.
+ [b]Note:[/b] [member specular_mode] only applies to the specular blob. It does not affect specular reflections from the sky, screen-space reflections, [VoxelGI], SDFGI or [ReflectionProbe]s. To disable reflections from these sources as well, set [member metallic_specular] to [code]0.0[/code] instead.
</member>
<member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
If [code]true[/code], subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges.
</member>
<member name="subsurf_scatter_skin_mode" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], subsurface scattering will use a special mode optimized for the color and density of human skin.
+ If [code]true[/code], subsurface scattering will use a special mode optimized for the color and density of human skin, such as boosting the intensity of the red channel in subsurface scattering.
</member>
<member name="subsurf_scatter_strength" type="float" setter="set_subsurface_scattering_strength" getter="get_subsurface_scattering_strength" default="0.0">
The strength of the subsurface scattering effect.
@@ -365,14 +366,19 @@
Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by [member subsurf_scatter_strength].
</member>
<member name="subsurf_scatter_transmittance_boost" type="float" setter="set_transmittance_boost" getter="get_transmittance_boost" default="0.0">
+ The intensity of the subsurface scattering transmittance effect.
</member>
<member name="subsurf_scatter_transmittance_color" type="Color" setter="set_transmittance_color" getter="get_transmittance_color" default="Color(1, 1, 1, 1)">
+ The color to multiply the subsurface scattering transmittance effect with. Ignored if [member subsurf_scatter_skin_mode] is [code]true[/code].
</member>
<member name="subsurf_scatter_transmittance_depth" type="float" setter="set_transmittance_depth" getter="get_transmittance_depth" default="0.1">
+ The depth of the subsurface scattering transmittance effect.
</member>
<member name="subsurf_scatter_transmittance_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
+ If [code]true[/code], enables subsurface scattering transmittance. Only effective if [member subsurf_scatter_enabled] is [code]true[/code]. See also [member backlight_enabled].
</member>
<member name="subsurf_scatter_transmittance_texture" type="Texture2D" setter="set_texture" getter="get_texture">
+ The texture to use for multiplying the intensity of the subsurface scattering transmitteance intensity. See also [member subsurf_scatter_texture]. Ignored if [member subsurf_scatter_skin_mode] is [code]true[/code].
</member>
<member name="texture_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="BaseMaterial3D.TextureFilter" default="3">
Filter flags for the texture. See [enum TextureFilter] for options.
@@ -385,6 +391,7 @@
If [code]true[/code], transparency is enabled on the body. See also [member blend_mode].
</member>
<member name="use_particle_trails" type="bool" setter="set_flag" getter="get_flag" default="false">
+ If [code]true[/code], enables parts of the shader required for [GPUParticles3D] trails to function. This also requires using a mesh with appropriate skinning, such as [RibbonTrailMesh] or [TubeTrailMesh]. Enabling this feature outside of materials used in [GPUParticles3D] meshes will break material rendering.
</member>
<member name="use_point_size" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], render point size can be changed.
@@ -522,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.
@@ -606,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.
@@ -624,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.
@@ -682,6 +690,7 @@
Enables the skin mode for subsurface scattering which is used to improve the look of subsurface scattering when used for human skin.
</constant>
<constant name="FLAG_PARTICLE_TRAILS_MODE" value="19" enum="Flags">
+ Enables parts of the shader required for [GPUParticles3D] trails to function. This also requires using a mesh with appropriate skinning, such as [RibbonTrailMesh] or [TubeTrailMesh]. Enabling this feature outside of materials used in [GPUParticles3D] meshes will break material rendering.
</constant>
<constant name="FLAG_ALBEDO_TEXTURE_MSDF" value="20" enum="Flags">
Enables multichannel signed distance field rendering shader.
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index 6d9b679fbc..acc2fd34dd 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -70,6 +70,7 @@
<param index="0" name="euler" type="Vector3" />
<param index="1" name="order" type="int" default="2" />
<description>
+ Constructs a pure rotation Basis matrix from Euler angles in the specified Euler rotation order. By default, use YXZ order (most common). See the [enum EulerOrder] enum for possible values.
</description>
</method>
<method name="from_scale" qualifiers="static">
@@ -112,6 +113,12 @@
Returns [code]true[/code] if this basis and [param b] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
</description>
</method>
+ <method name="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this basis is finite, by calling [method @GlobalScope.is_finite] on each component.
+ </description>
+ </method>
<method name="looking_at" qualifiers="static">
<return type="Basis" />
<param index="0" name="target" type="Vector3" />
@@ -190,18 +197,6 @@
</member>
</members>
<constants>
- <constant name="EULER_ORDER_XYZ" value="0">
- </constant>
- <constant name="EULER_ORDER_XZY" value="1">
- </constant>
- <constant name="EULER_ORDER_YXZ" value="2">
- </constant>
- <constant name="EULER_ORDER_YZX" value="3">
- </constant>
- <constant name="EULER_ORDER_ZXY" value="4">
- </constant>
- <constant name="EULER_ORDER_ZYX" value="5">
- </constant>
<constant name="IDENTITY" value="Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)">
The identity basis, with no rotation or scaling applied.
This is identical to calling [code]Basis()[/code] without any parameters. This constant can be used to make your code clearer, and for consistency with C#.
diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml
index b3fa55f154..e9774ef485 100644
--- a/doc/classes/BitMap.xml
+++ b/doc/classes/BitMap.xml
@@ -12,7 +12,7 @@
<method name="convert_to_image" qualifiers="const">
<return type="Image" />
<description>
- Returns an image of the same size as the bitmap and with a [enum Image.Format] of type [code]FORMAT_L8[/code]. [code]true[/code] bits of the bitmap are being converted into white pixels, and [code]false[/code] bits into black.
+ Returns an image of the same size as the bitmap and with a [enum Image.Format] of type [constant Image.FORMAT_L8]. [code]true[/code] bits of the bitmap are being converted into white pixels, and [code]false[/code] bits into black.
</description>
</method>
<method name="create">
diff --git a/doc/classes/BoneMap.xml b/doc/classes/BoneMap.xml
index f7a4845b7d..7135406d3c 100644
--- a/doc/classes/BoneMap.xml
+++ b/doc/classes/BoneMap.xml
@@ -8,6 +8,7 @@
By assigning the actual [Skeleton3D] bone name as the key value, it maps the [Skeleton3D] to the [SkeletonProfile].
</description>
<tutorials>
+ <link title="Retargeting 3D Skeletons">$DOCS_URL/tutorials/assets_pipeline/retargeting_3d_skeletons.html</link>
</tutorials>
<methods>
<method name="find_profile_bone_name" qualifiers="const">
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index e78cdfc951..d2c9a77486 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -11,7 +11,7 @@
func _ready():
var button = Button.new()
button.text = "Click me"
- button.connect("pressed", self, "_button_pressed")
+ button.pressed.connect(self._button_pressed)
add_child(button)
func _button_pressed():
@@ -22,7 +22,7 @@
{
var button = new Button();
button.Text = "Click me";
- button.Connect("pressed", this, nameof(ButtonPressed));
+ button.Pressed += ButtonPressed;
AddChild(button);
}
@@ -42,7 +42,7 @@
</tutorials>
<members>
<member name="alignment" type="int" setter="set_text_alignment" getter="get_text_alignment" enum="HorizontalAlignment" default="1">
- Text alignment policy for the button's text, use one of the [enum @GlobalScope.HorizontalAlignment] constants.
+ Text alignment policy for the button's text, use one of the [enum HorizontalAlignment] constants.
</member>
<member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text" default="false">
When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text.
@@ -58,7 +58,7 @@
To edit margin and spacing of the icon, use [theme_item h_separation] theme property and [code]content_margin_*[/code] properties of the used [StyleBox]es.
</member>
<member name="icon_alignment" type="int" setter="set_icon_alignment" getter="get_icon_alignment" enum="HorizontalAlignment" default="0">
- Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same [enum @GlobalScope.HorizontalAlignment] constants as the text alignment. If centered, text will draw on top of the icon.
+ Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same [enum HorizontalAlignment] constants as the text alignment. If centered, text will draw on top of the icon.
</member>
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml
index 906789d09f..314e46d9d0 100644
--- a/doc/classes/CPUParticles2D.xml
+++ b/doc/classes/CPUParticles2D.xml
@@ -29,12 +29,14 @@
<return type="float" />
<param index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
<description>
+ Returns the maximum value range for the given parameter.
</description>
</method>
<method name="get_param_min" qualifiers="const">
<return type="float" />
<param index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
<description>
+ Returns the minimum value range for the given parameter.
</description>
</method>
<method name="get_particle_flag" qualifiers="const">
@@ -63,6 +65,7 @@
<param index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
<param index="1" name="value" type="float" />
<description>
+ Sets the maximum value for the given parameter.
</description>
</method>
<method name="set_param_min">
@@ -70,6 +73,7 @@
<param index="0" name="param" type="int" enum="CPUParticles2D.Parameter" />
<param index="1" name="value" type="float" />
<description>
+ Sets the minimum value for the given parameter.
</description>
</method>
<method name="set_particle_flag">
@@ -89,29 +93,38 @@
Each particle's rotation will be animated along this [Curve].
</member>
<member name="angle_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum initial rotation applied to each particle, in degrees.
</member>
<member name="angle_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member angle_max].
</member>
<member name="angular_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's angular velocity will vary along this [Curve].
</member>
<member name="angular_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum initial angular velocity (rotation speed) applied to each particle in [i]degrees[/i] per second.
</member>
<member name="angular_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member angular_velocity_max].
</member>
<member name="anim_offset_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's animation offset will vary along this [Curve].
</member>
<member name="anim_offset_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum animation offset that corresponds to frame index in the texture. [code]0[/code] is the first frame, [code]1[/code] is the last one. See [member CanvasItemMaterial.particles_animation].
</member>
<member name="anim_offset_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member anim_offset_max].
</member>
<member name="anim_speed_curve" type="Curve" setter="set_param_curve" getter="get_param_curve">
Each particle's animation speed will vary along this [Curve].
</member>
<member name="anim_speed_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum particle animation speed. Animation speed of [code]1[/code] means that the particles will make full [code]0[/code] to [code]1[/code] offset cycle during lifetime, [code]2[/code] means [code]2[/code] cycles etc.
+ With animation speed greater than [code]1[/code], remember to enable [member CanvasItemMaterial.particles_anim_loop] property if you want the animation to repeat.
</member>
<member name="anim_speed_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member anim_speed_max].
</member>
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
Each particle's initial color. If [member texture] is defined, it will be multiplied by this color.
@@ -126,8 +139,10 @@
Damping will vary along this [Curve].
</member>
<member name="damping_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ The maximum rate at which particles lose velocity. For example value of [code]100[/code] means that the particle will go from [code]100[/code] velocity to [code]0[/code] in [code]1[/code] second.
</member>
<member name="damping_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member damping_max].
</member>
<member name="direction" type="Vector2" setter="set_direction" getter="get_direction" default="Vector2(1, 0)">
Unit vector specifying the particles' emission direction.
@@ -160,7 +175,7 @@
How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins.
</member>
<member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="0">
- The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself.
+ The particle system's frame rate is fixed to a value. For example, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself.
</member>
<member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true">
If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect.
@@ -172,12 +187,16 @@
Each particle's hue will vary along this [Curve].
</member>
<member name="hue_variation_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum initial hue variation applied to each particle. It will shift the particle color's hue.
</member>
<member name="hue_variation_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member hue_variation_max].
</member>
<member name="initial_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum initial velocity magnitude for each particle. Direction comes from [member direction] and [member spread].
</member>
<member name="initial_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member initial_velocity_max].
</member>
<member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0">
Amount of time each particle will exist.
@@ -189,8 +208,10 @@
Each particle's linear acceleration will vary along this [Curve].
</member>
<member name="linear_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum linear acceleration applied to each particle in the direction of motion.
</member>
<member name="linear_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member linear_accel_max].
</member>
<member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="false">
If [code]true[/code], particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the [CPUParticles2D] node (and its parents) when it is moved or rotated. If [code]false[/code], particles use global coordinates; they will not move or rotate along the [CPUParticles2D] node (and its parents) when it is moved or rotated.
@@ -202,8 +223,10 @@
Each particle's orbital velocity will vary along this [Curve].
</member>
<member name="orbit_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second.
</member>
<member name="orbit_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member orbit_velocity_max].
</member>
<member name="particle_flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
Align Y axis of particle with the direction of its velocity.
@@ -215,8 +238,10 @@
Each particle's radial acceleration will vary along this [Curve].
</member>
<member name="radial_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum radial acceleration applied to each particle. Makes particle accelerate away from the origin or towards it if negative.
</member>
<member name="radial_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member radial_accel_max].
</member>
<member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio" default="0.0">
Emission lifetime randomness ratio.
@@ -225,17 +250,24 @@
Each particle's scale will vary along this [Curve].
</member>
<member name="scale_amount_max" type="float" setter="set_param_max" getter="get_param_max" default="1.0">
+ Maximum initial scale applied to each particle.
</member>
<member name="scale_amount_min" type="float" setter="set_param_min" getter="get_param_min" default="1.0">
+ Minimum equivalent of [member scale_amount_max].
</member>
<member name="scale_curve_x" type="Curve" setter="set_scale_curve_x" getter="get_scale_curve_x">
+ Each particle's horizontal scale will vary along this [Curve].
+ [member split_scale] must be enabled.
</member>
<member name="scale_curve_y" type="Curve" setter="set_scale_curve_y" getter="get_scale_curve_y">
+ Each particle's vertical scale will vary along this [Curve].
+ [member split_scale] must be enabled.
</member>
<member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles.
</member>
<member name="split_scale" type="bool" setter="set_split_scale" getter="get_split_scale" default="false">
+ If [code]true[/code], the scale curve will be split into x and y components. See [member scale_curve_x] and [member scale_curve_y].
</member>
<member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0">
Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees.
@@ -244,8 +276,10 @@
Each particle's tangential acceleration will vary along this [Curve].
</member>
<member name="tangential_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0">
+ Maximum tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.
</member>
<member name="tangential_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
+ Minimum equivalent of [member tangential_accel_max].
</member>
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
Particle texture. If [code]null[/code], particles will be squares.
diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml
index 6b39c08b3f..3a15a117f5 100644
--- a/doc/classes/CPUParticles3D.xml
+++ b/doc/classes/CPUParticles3D.xml
@@ -28,12 +28,14 @@
<return type="float" />
<param index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
<description>
+ Returns the maximum value range for the given parameter.
</description>
</method>
<method name="get_param_min" qualifiers="const">
<return type="float" />
<param index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
<description>
+ Returns the minimum value range for the given parameter.
</description>
</method>
<method name="get_particle_flag" qualifiers="const">
@@ -62,7 +64,7 @@
<param index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
<param index="1" name="value" type="float" />
<description>
- Sets the maximum value for the given parameter
+ Sets the maximum value for the given parameter.
</description>
</method>
<method name="set_param_min">
@@ -70,7 +72,7 @@
<param index="0" name="param" type="int" enum="CPUParticles3D.Parameter" />
<param index="1" name="value" type="float" />
<description>
- Sets the minimum value for the given parameter
+ Sets the minimum value for the given parameter.
</description>
</method>
<method name="set_particle_flag">
@@ -187,7 +189,7 @@
How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins.
</member>
<member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="0">
- The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself.
+ The particle system's frame rate is fixed to a value. For example, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself.
</member>
<member name="flatness" type="float" setter="set_flatness" getter="get_flatness" default="0.0">
Amount of [member spread] in Y/Z plane. A value of [code]1[/code] restricts particles to X/Z plane.
diff --git a/doc/classes/CallbackTweener.xml b/doc/classes/CallbackTweener.xml
index 6e4ee0380e..626405bc8e 100644
--- a/doc/classes/CallbackTweener.xml
+++ b/doc/classes/CallbackTweener.xml
@@ -14,7 +14,8 @@
<return type="CallbackTweener" />
<param index="0" name="delay" type="float" />
<description>
- Makes the callback call delayed by given time in seconds. Example:
+ Makes the callback call delayed by given time in seconds.
+ [b]Example:[/b]
[codeblock]
var tween = get_tree().create_tween()
tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() after 2 seconds
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml
index 671ecb6af1..9315a85e1f 100644
--- a/doc/classes/Camera2D.xml
+++ b/doc/classes/Camera2D.xml
@@ -52,14 +52,14 @@
<return type="Vector2" />
<description>
Returns this camera's target position, in global coordinates.
- [b]Note:[/b] The returned value is not the same as [member Node2D.global_position], as it is affected by the drag properties. It is also not the same as the current position if [member smoothing_enabled] is [code]true[/code] (see [method get_screen_center_position]).
+ [b]Note:[/b] The returned value is not the same as [member Node2D.global_position], as it is affected by the drag properties. It is also not the same as the current position if [member position_smoothing_enabled] is [code]true[/code] (see [method get_screen_center_position]).
</description>
</method>
<method name="reset_smoothing">
<return type="void" />
<description>
Sets the camera's position immediately to its current smoothing destination.
- This method has no effect if [member smoothing_enabled] is [code]false[/code].
+ This method has no effect if [member position_smoothing_enabled] is [code]false[/code].
</description>
</method>
<method name="set_drag_margin">
@@ -138,7 +138,7 @@
</member>
<member name="limit_smoothed" type="bool" setter="set_limit_smoothing_enabled" getter="is_limit_smoothing_enabled" default="false">
If [code]true[/code], the camera smoothly stops when reaches its limits.
- This property has no effect if [member smoothing_enabled] is [code]false[/code].
+ This property has no effect if [member position_smoothing_enabled] is [code]false[/code].
[b]Note:[/b] To immediately update the camera's position to be within limits without smoothing, even with this setting enabled, invoke [method reset_smoothing].
</member>
<member name="limit_top" type="int" setter="set_limit" getter="get_limit" default="-10000000">
@@ -147,6 +147,12 @@
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)">
The camera's relative offset. Useful for looking around or camera shake animations. The offsetted camera can go past the limits defined in [member limit_top], [member limit_bottom], [member limit_left] and [member limit_right].
</member>
+ <member name="position_smoothing_enabled" type="bool" setter="set_position_smoothing_enabled" getter="is_position_smoothing_enabled" default="false">
+ If [code]true[/code], the camera's view smoothly moves towards its target position at [member position_smoothing_speed].
+ </member>
+ <member name="position_smoothing_speed" type="float" setter="set_position_smoothing_speed" getter="get_position_smoothing_speed" default="5.0">
+ Speed in pixels per second of the camera's smoothing effect when [member position_smoothing_enabled] is [code]true[/code].
+ </member>
<member name="process_callback" type="int" setter="set_process_callback" getter="get_process_callback" enum="Camera2D.Camera2DProcessCallback" default="1">
The camera's process callback. See [enum Camera2DProcessCallback].
</member>
@@ -157,12 +163,6 @@
<member name="rotation_smoothing_speed" type="float" setter="set_rotation_smoothing_speed" getter="get_rotation_smoothing_speed" default="5.0">
The angular, asymptotic speed of the camera's rotation smoothing effect when [member rotation_smoothing_enabled] is [code]true[/code].
</member>
- <member name="smoothing_enabled" type="bool" setter="set_enable_follow_smoothing" getter="is_follow_smoothing_enabled" default="false">
- If [code]true[/code], the camera smoothly moves towards the target at [member smoothing_speed].
- </member>
- <member name="smoothing_speed" type="float" setter="set_follow_smoothing" getter="get_follow_smoothing" default="5.0">
- Speed in pixels per second of the camera's smoothing effect when [member smoothing_enabled] is [code]true[/code].
- </member>
<member name="zoom" type="Vector2" setter="set_zoom" getter="get_zoom" default="Vector2(1, 1)">
The camera's zoom. A zoom of [code]Vector(2, 2)[/code] doubles the size seen in the viewport. A zoom of [code]Vector(0.5, 0.5)[/code] halves the size seen in the viewport.
</member>
diff --git a/doc/classes/CameraAttributes.xml b/doc/classes/CameraAttributes.xml
index a741728c14..23dc212069 100644
--- a/doc/classes/CameraAttributes.xml
+++ b/doc/classes/CameraAttributes.xml
@@ -12,19 +12,19 @@
<tutorials>
</tutorials>
<members>
- <member name="auto_exposure_enabled" type="bool" setter="set_auto_exposure_enabled" getter="is_auto_exposure_enabled">
+ <member name="auto_exposure_enabled" type="bool" setter="set_auto_exposure_enabled" getter="is_auto_exposure_enabled" default="false">
If [code]true[/code], enables the tonemapping auto exposure mode of the scene renderer. If [code]true[/code], the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light.
</member>
- <member name="auto_exposure_scale" type="float" setter="set_auto_exposure_scale" getter="get_auto_exposure_scale">
+ <member name="auto_exposure_scale" type="float" setter="set_auto_exposure_scale" getter="get_auto_exposure_scale" default="0.4">
The scale of the auto exposure effect. Affects the intensity of auto exposure.
</member>
- <member name="auto_exposure_speed" type="float" setter="set_auto_exposure_speed" getter="get_auto_exposure_speed">
+ <member name="auto_exposure_speed" type="float" setter="set_auto_exposure_speed" getter="get_auto_exposure_speed" default="0.5">
The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure.
</member>
- <member name="exposure_multiplier" type="float" setter="set_exposure_multiplier" getter="get_exposure_multiplier">
+ <member name="exposure_multiplier" type="float" setter="set_exposure_multiplier" getter="get_exposure_multiplier" default="1.0">
Multiplier for the exposure amount. A higher value results in a brighter image.
</member>
- <member name="exposure_sensitivity" type="float" setter="set_exposure_sensitivity" getter="get_exposure_sensitivity">
+ <member name="exposure_sensitivity" type="float" setter="set_exposure_sensitivity" getter="get_exposure_sensitivity" default="100.0">
Sensitivity of camera sensors, measured in ISO. A higher sensitivity results in a brighter image. Only available when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled. When [member auto_exposure_enabled] this can be used as a method of exposure compensation, doubling the value will increase the exposure value (measured in EV100) by 1 stop.
</member>
</members>
diff --git a/doc/classes/CameraTexture.xml b/doc/classes/CameraTexture.xml
index 8eedfe3580..e7020c869e 100644
--- a/doc/classes/CameraTexture.xml
+++ b/doc/classes/CameraTexture.xml
@@ -16,6 +16,7 @@
<member name="camera_is_active" type="bool" setter="set_camera_active" getter="get_camera_active" default="false">
Convenience property that gives access to the active property of the [CameraFeed].
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
<member name="which_feed" type="int" setter="set_which_feed" getter="get_which_feed" enum="CameraServer.FeedImage" default="0">
Which image within the [CameraFeed] we want access to, important if the camera image is split in a Y and CbCr component.
</member>
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 947e6a3d4c..a2859552a9 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -114,7 +114,7 @@
<param index="2" name="src_rect" type="Rect2" />
<param index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<description>
- Draws a textured rectangle region of the font texture with LCD sub-pixel anti-aliasing at a given position, optionally modulated by a color.
+ Draws a textured rectangle region of the font texture with LCD subpixel anti-aliasing at a given position, optionally modulated by a color.
Texture is drawn using the following blend operation, blend mode of the [CanvasItemMaterial] is ignored:
[codeblock]
dst.r = texture.r * modulate.r * modulate.a + dst.r * (1.0 - texture.r * modulate.a);
@@ -416,7 +416,7 @@
<method name="get_global_transform" qualifiers="const">
<return type="Transform2D" />
<description>
- Returns the global transform matrix of this item.
+ Returns the global transform matrix of this item, i.e. the combined transform up to the topmost [CanvasItem] node. The topmost item is a [CanvasItem] that either has no parent, has non-[CanvasItem] parent or it has [member top_level] enabled.
</description>
</method>
<method name="get_global_transform_with_canvas" qualifiers="const">
@@ -456,6 +456,13 @@
Returns this item's transform in relation to the viewport.
</description>
</method>
+ <method name="get_visibility_layer_bit" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="layer" type="int" />
+ <description>
+ Returns an individual bit on the rendering visibility layer.
+ </description>
+ </method>
<method name="get_world_2d" qualifiers="const">
<return type="World2D" />
<description>
@@ -527,6 +534,14 @@
If [param enable] is [code]true[/code], this node will receive [constant NOTIFICATION_TRANSFORM_CHANGED] when its global transform changes.
</description>
</method>
+ <method name="set_visibility_layer_bit">
+ <return type="void" />
+ <param index="0" name="layer" type="int" />
+ <param index="1" name="enabled" type="bool" />
+ <description>
+ Set/clear individual bits on the rendering visibility layer. This simplifies editing this [CanvasItem]'s visibility layer.
+ </description>
+ </method>
<method name="show">
<return type="void" />
<description>
@@ -535,7 +550,7 @@
</method>
</methods>
<members>
- <member name="clip_children" type="bool" setter="set_clip_children" getter="is_clipping_children" default="false">
+ <member name="clip_children" type="int" setter="set_clip_children_mode" getter="get_clip_children_mode" enum="CanvasItem.ClipChildrenMode" default="0">
Allows the current node to clip children nodes, essentially acting as a mask.
</member>
<member name="light_mask" type="int" setter="set_light_mask" getter="get_light_mask" default="1">
@@ -565,6 +580,9 @@
<member name="use_parent_material" type="bool" setter="set_use_parent_material" getter="get_use_parent_material" default="false">
If [code]true[/code], the parent [CanvasItem]'s [member material] property is used as this one's material.
</member>
+ <member name="visibility_layer" type="int" setter="set_visibility_layer" getter="get_visibility_layer" default="1">
+ The rendering layer in which this [CanvasItem] is rendered by [Viewport] nodes. A [Viewport] will render a [CanvasItem] if it and all its parents share a layer with the [Viewport]'s canvas cull mask.
+ </member>
<member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true">
If [code]true[/code], this [CanvasItem] is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]).
[b]Note:[/b] For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead.
@@ -653,5 +671,13 @@
<constant name="TEXTURE_REPEAT_MAX" value="4" enum="TextureRepeat">
Represents the size of the [enum TextureRepeat] enum.
</constant>
+ <constant name="CLIP_CHILDREN_DISABLED" value="0" enum="ClipChildrenMode">
+ </constant>
+ <constant name="CLIP_CHILDREN_ONLY" value="1" enum="ClipChildrenMode">
+ </constant>
+ <constant name="CLIP_CHILDREN_AND_DRAW" value="2" enum="ClipChildrenMode">
+ </constant>
+ <constant name="CLIP_CHILDREN_MAX" value="3" enum="ClipChildrenMode">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml
index 50c0860d1f..7c1b19b961 100644
--- a/doc/classes/CanvasLayer.xml
+++ b/doc/classes/CanvasLayer.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
Canvas drawing layer. [CanvasItem] nodes that are direct or indirect children of a [CanvasLayer] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [CanvasLayer] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below).
+ Embedded [Window]s are placed in layer 1024. CanvasItems in layer 1025 or above appear in front of embedded windows, CanvasItems in layer 1023 or below appear behind embedded windows.
</description>
<tutorials>
<link title="Viewport and canvas transforms">$DOCS_URL/tutorials/2d/2d_transforms.html</link>
diff --git a/doc/classes/CanvasTexture.xml b/doc/classes/CanvasTexture.xml
index ac18c2d474..d5bf65835f 100644
--- a/doc/classes/CanvasTexture.xml
+++ b/doc/classes/CanvasTexture.xml
@@ -1,25 +1,37 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CanvasTexture" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Texture with optional normal and specular maps for use in 2D rendering.
</brief_description>
<description>
+ [CanvasTexture] is an alternative to [ImageTexture] for 2D rendering. It allows using normal maps and specular maps in any node that inherits from [CanvasItem]. [CanvasTexture] also allows overriding the texture's filter and repeat mode independently of the node's properties (or the project settings).
+ [b]Note:[/b] [CanvasTexture] cannot be used in 3D rendering. For physically-based materials in 3D, use [BaseMaterial3D] instead.
</description>
<tutorials>
</tutorials>
<members>
<member name="diffuse_texture" type="Texture2D" setter="set_diffuse_texture" getter="get_diffuse_texture">
+ The diffuse (color) texture to use. This is the main texture you want to set in most cases.
</member>
<member name="normal_texture" type="Texture2D" setter="set_normal_texture" getter="get_normal_texture">
+ The normal map texture to use. Only has a visible effect if [Light2D]s are affecting this [CanvasTexture].
+ [b]Note:[/b] Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
<member name="specular_color" type="Color" setter="set_specular_color" getter="get_specular_color" default="Color(1, 1, 1, 1)">
+ The multiplier for specular reflection colors. The [Light2D]'s color is also taken into account when determining the reflection color. Only has a visible effect if [Light2D]s are affecting this [CanvasTexture].
</member>
<member name="specular_shininess" type="float" setter="set_specular_shininess" getter="get_specular_shininess" default="1.0">
+ The specular exponent for [Light2D] specular reflections. Higher values result in a more glossy/"wet" look, with reflections becoming more localized and less visible overall. The default value of [code]1.0[/code] disables specular reflections entirely. Only has a visible effect if [Light2D]s are affecting this [CanvasTexture].
</member>
<member name="specular_texture" type="Texture2D" setter="set_specular_texture" getter="get_specular_texture">
+ The specular map to use for [Light2D] specular reflections. This should be a grayscale or colored texture, with brighter areas resulting in a higher [member specular_shininess] value. Using a colored [member specular_texture] allows controlling specular shininess on a per-channel basis. Only has a visible effect if [Light2D]s are affecting this [CanvasTexture].
</member>
<member name="texture_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="CanvasItem.TextureFilter" default="0">
+ The texture filtering mode to use when drawing this [CanvasTexture].
</member>
<member name="texture_repeat" type="int" setter="set_texture_repeat" getter="get_texture_repeat" enum="CanvasItem.TextureRepeat" default="0">
+ The texture repeat mode to use when drawing this [CanvasTexture].
</member>
</members>
</class>
diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml
index 2f8e1a7bb8..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>
@@ -152,7 +152,7 @@
</member>
<member name="floor_snap_length" type="float" setter="set_floor_snap_length" getter="get_floor_snap_length" default="1.0">
Sets a snapping distance. When set to a value different from [code]0.0[/code], the body is kept attached to slopes when calling [method move_and_slide]. The snapping vector is determined by the given distance along the opposite direction of the [member up_direction].
- As long as the snapping vector is in contact with the ground and the body moves against `up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along `up_direction`, so it will be able to detach from the ground when jumping.
+ As long as the snapping vector is in contact with the ground and the body moves against [member up_direction], the body will remain attached to the surface. Snapping is not applied if the body moves along [member up_direction], so it will be able to detach from the ground when jumping.
</member>
<member name="floor_stop_on_slope" type="bool" setter="set_floor_stop_on_slope_enabled" getter="is_floor_stop_on_slope_enabled" default="true">
If [code]true[/code], the body will not slide on slopes when calling [method move_and_slide] when the body is standing still.
diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml
index 6a1975d40f..309e2231a4 100644
--- a/doc/classes/CharacterBody3D.xml
+++ b/doc/classes/CharacterBody3D.xml
@@ -137,7 +137,7 @@
</member>
<member name="floor_snap_length" type="float" setter="set_floor_snap_length" getter="get_floor_snap_length" default="0.1">
Sets a snapping distance. When set to a value different from [code]0.0[/code], the body is kept attached to slopes when calling [method move_and_slide]. The snapping vector is determined by the given distance along the opposite direction of the [member up_direction].
- As long as the snapping vector is in contact with the ground and the body moves against `up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along `up_direction`, so it will be able to detach from the ground when jumping.
+ As long as the snapping vector is in contact with the ground and the body moves against [member up_direction], the body will remain attached to the surface. Snapping is not applied if the body moves along [member up_direction], so it will be able to detach from the ground when jumping.
</member>
<member name="floor_stop_on_slope" type="bool" setter="set_floor_stop_on_slope_enabled" getter="is_floor_stop_on_slope_enabled" default="true">
If [code]true[/code], the body will not slide on slopes when calling [method move_and_slide] when the body is standing still.
diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml
index 2ffe880971..699e872e99 100644
--- a/doc/classes/CheckBox.xml
+++ b/doc/classes/CheckBox.xml
@@ -4,7 +4,7 @@
Binary choice user interface widget. See also [CheckButton].
</brief_description>
<description>
- A checkbox allows the user to make a binary choice (choosing only one of two possible options). It's similar to [CheckButton] in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use CheckBox when toggling it has [b]no[/b] immediate effect on something. For instance, it should be used when toggling it will only do something once a confirmation button is pressed.
+ A checkbox allows the user to make a binary choice (choosing only one of two possible options). It's similar to [CheckButton] in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use CheckBox when toggling it has [b]no[/b] immediate effect on something. For example, it could be used when toggling it will only do something once a confirmation button is pressed.
See also [BaseButton] which contains common properties and methods associated with this node.
</description>
<tutorials>
diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml
index 2f584103be..dfbaa7cbee 100644
--- a/doc/classes/CheckButton.xml
+++ b/doc/classes/CheckButton.xml
@@ -4,7 +4,7 @@
Checkable button. See also [CheckBox].
</brief_description>
<description>
- CheckButton is a toggle button displayed as a check field. It's similar to [CheckBox] in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use CheckButton when toggling it has an [b]immediate[/b] effect on something. For instance, it should be used if toggling it enables/disables a setting without requiring the user to press a confirmation button.
+ CheckButton is a toggle button displayed as a check field. It's similar to [CheckBox] in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use CheckButton when toggling it has an [b]immediate[/b] effect on something. For example, it could be used if toggling it enables/disables a setting without requiring the user to press a confirmation button.
See also [BaseButton] which contains common properties and methods associated with this node.
</description>
<tutorials>
diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml
index 58a536406f..5d3c6210f6 100644
--- a/doc/classes/ClassDB.xml
+++ b/doc/classes/ClassDB.xml
@@ -13,7 +13,7 @@
<return type="bool" />
<param index="0" name="class" type="StringName" />
<description>
- Returns [code]true[/code] if you can instance objects from the specified [param class], [code]false[/code] in other case.
+ Returns [code]true[/code] if objects can be instantiated from the specified [param class], otherwise returns [code]false[/code].
</description>
</method>
<method name="class_exists" qualifiers="const">
diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml
index ca482a39e0..e7ef5fb289 100644
--- a/doc/classes/CodeEdit.xml
+++ b/doc/classes/CodeEdit.xml
@@ -4,7 +4,7 @@
Multiline text control intended for editing code.
</brief_description>
<description>
- CodeEdit is a specialised [TextEdit] designed for editing plain text code files. It contains a bunch of features commonly found in code editors such as line numbers, line folding, code completion, indent management and string / comment management.
+ CodeEdit is a specialized [TextEdit] designed for editing plain text code files. It contains a bunch of features commonly found in code editors such as line numbers, line folding, code completion, indent management and string / comment management.
[b]Note:[/b] By default [CodeEdit] always use left-to-right text direction to correctly display source code.
</description>
<tutorials>
@@ -616,8 +616,8 @@
<theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
Sets the font [Color] when [member TextEdit.editable] is disabled.
</theme_item>
- <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
- Sets the [Color] of the selected text. [member TextEdit.override_selected_font_color] has to be enabled.
+ <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
+ Sets the [Color] of the selected text. If equal to [code]Color(0, 0, 0, 0)[/code], it will be ignored.
</theme_item>
<theme_item name="line_length_guideline_color" data_type="color" type="Color" default="Color(0.3, 0.5, 0.8, 0.1)">
[Color] of the main line length guideline, secondary guidelines will have 50% alpha applied.
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 3a3803c1da..90fbdcc622 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -141,12 +141,6 @@
[/codeblocks]
</description>
</method>
- <method name="find_named_color" qualifiers="static">
- <return type="int" />
- <param index="0" name="name" type="String" />
- <description>
- </description>
- </method>
<method name="from_hsv" qualifiers="static">
<return type="Color" />
<param index="0" name="h" type="float" />
@@ -187,6 +181,7 @@
<return type="Color" />
<param index="0" name="rgbe" type="int" />
<description>
+ Encodes a [Color] from a RGBE9995 format integer. See [constant Image.FORMAT_RGBE9995].
</description>
</method>
<method name="from_string" qualifiers="static">
@@ -194,6 +189,7 @@
<param index="0" name="str" type="String" />
<param index="1" name="default" type="Color" />
<description>
+ Creates a [Color] from string, which can be either a HTML color code or a named color. Fallbacks to [param default] if the string does not denote any valid color.
</description>
</method>
<method name="get_luminance" qualifiers="const">
@@ -201,36 +197,24 @@
<description>
Returns the luminance of the color in the [code][0.0, 1.0][/code] range.
This is useful when determining light or dark color. Colors with a luminance smaller than 0.5 can be generally considered dark.
- [b]Note:[/b] [method get_luminance] relies on the colour being in the linear color space to return an accurate relative luminance value. If the color is in the sRGB color space, use [method srgb_to_linear] to convert it to the linear color space first.
- </description>
- </method>
- <method name="get_named_color" qualifiers="static">
- <return type="Color" />
- <param index="0" name="idx" type="int" />
- <description>
- </description>
- </method>
- <method name="get_named_color_count" qualifiers="static">
- <return type="int" />
- <description>
- </description>
- </method>
- <method name="get_named_color_name" qualifiers="static">
- <return type="String" />
- <param index="0" name="idx" type="int" />
- <description>
+ [b]Note:[/b] [method get_luminance] relies on the color being in the linear color space to return an accurate relative luminance value. If the color is in the sRGB color space, use [method srgb_to_linear] to convert it to the linear color space first.
</description>
</method>
<method name="hex" qualifiers="static">
<return type="Color" />
<param index="0" name="hex" type="int" />
<description>
+ Returns the [Color] associated with the provided integer number, with 8 bits per channel in ARGB order. The integer should be 32-bit. Best used with hexadecimal notation.
+ [codeblock]
+ modulate = Color.hex(0xffff0000) # red
+ [/codeblock]
</description>
</method>
<method name="hex64" qualifiers="static">
<return type="Color" />
<param index="0" name="hex" type="int" />
<description>
+ Same as [method hex], but takes 64-bit integer and the color uses 16 bits per channel.
</description>
</method>
<method name="html" qualifiers="static">
diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml
index d09b7f003e..2b287d7546 100644
--- a/doc/classes/ColorPicker.xml
+++ b/doc/classes/ColorPicker.xml
@@ -55,26 +55,38 @@
</method>
</methods>
<members>
+ <member name="can_add_swatches" type="bool" setter="set_can_add_swatches" getter="are_swatches_enabled" default="true">
+ If [code]true[/code], it's possible to add presets under Swatches. If [code]false[/code], the button to add presets is disabled.
+ </member>
<member name="color" type="Color" setter="set_pick_color" getter="get_pick_color" default="Color(1, 1, 1, 1)">
The currently selected color.
</member>
<member name="color_mode" type="int" setter="set_color_mode" getter="get_color_mode" enum="ColorPicker.ColorModeType" default="0">
The currently selected color mode. See [enum ColorModeType].
</member>
+ <member name="color_modes_visible" type="bool" setter="set_modes_visible" getter="are_modes_visible" default="true">
+ If [code]true[/code], the color mode buttons are visible.
+ </member>
<member name="deferred_mode" type="bool" setter="set_deferred_mode" getter="is_deferred_mode" default="false">
If [code]true[/code], the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues).
</member>
<member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha" default="true">
If [code]true[/code], shows an alpha channel slider (opacity).
</member>
+ <member name="hex_visible" type="bool" setter="set_hex_visible" getter="is_hex_visible" default="true">
+ If [code]true[/code], the hex color code input field is visible.
+ </member>
<member name="picker_shape" type="int" setter="set_picker_shape" getter="get_picker_shape" enum="ColorPicker.PickerShapeType" default="0">
The shape of the color space view. See [enum PickerShapeType].
</member>
- <member name="presets_enabled" type="bool" setter="set_presets_enabled" getter="are_presets_enabled" default="true">
- If [code]true[/code], the "add preset" button is enabled.
- </member>
<member name="presets_visible" type="bool" setter="set_presets_visible" getter="are_presets_visible" default="true">
- If [code]true[/code], saved color presets are visible.
+ If [code]true[/code], the Swatches and Recent Colors presets are visible.
+ </member>
+ <member name="sampler_visible" type="bool" setter="set_sampler_visible" getter="is_sampler_visible" default="true">
+ If [code]true[/code], the color sampler and color preview are visible.
+ </member>
+ <member name="sliders_visible" type="bool" setter="set_sliders_visible" getter="are_sliders_visible" default="true">
+ If [code]true[/code], the color sliders are visible.
</member>
<member name="vertical" type="bool" setter="set_vertical" getter="is_vertical" overrides="BoxContainer" default="true" />
</members>
@@ -125,12 +137,16 @@
<constant name="SHAPE_OKHSL_CIRCLE" value="3" enum="PickerShapeType">
HSL OK Color Model circle color space.
</constant>
+ <constant name="SHAPE_NONE" value="4" enum="PickerShapeType">
+ The color space shape and the shape select button are hidden. Can't be selected from the shapes popup.
+ </constant>
</constants>
<theme_items>
<theme_item name="h_width" data_type="constant" type="int" default="30">
The width of the hue selection slider.
</theme_item>
<theme_item name="label_width" data_type="constant" type="int" default="10">
+ The minimum width of the color labels next to sliders.
</theme_item>
<theme_item name="margin" data_type="constant" type="int" default="4">
The margin around the [ColorPicker].
@@ -150,6 +166,9 @@
<theme_item name="color_hue" data_type="icon" type="Texture2D">
Custom texture for the hue selection slider on the right.
</theme_item>
+ <theme_item name="color_okhsl_hue" data_type="icon" type="Texture2D">
+ Custom texture for the H slider in the OKHSL color mode.
+ </theme_item>
<theme_item name="expanded_arrow" data_type="icon" type="Texture2D">
The icon for color preset drop down menu when expanded.
</theme_item>
@@ -160,8 +179,10 @@
The indicator used to signalize that the color value is outside the 0-1 range.
</theme_item>
<theme_item name="picker_cursor" data_type="icon" type="Texture2D">
+ The image displayed over the color box/circle (depending on the [member picker_shape]), marking the currently selected color.
</theme_item>
<theme_item name="sample_bg" data_type="icon" type="Texture2D">
+ Background panel for the color preview box (visible when the color is translucent).
</theme_item>
<theme_item name="screen_picker" data_type="icon" type="Texture2D">
The icon for the screen color picker button.
diff --git a/doc/classes/CompressedCubemap.xml b/doc/classes/CompressedCubemap.xml
index fbb0879fdc..10ee266897 100644
--- a/doc/classes/CompressedCubemap.xml
+++ b/doc/classes/CompressedCubemap.xml
@@ -1,8 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CompressedCubemap" inherits="CompressedTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ 6-sided texture typically used in 3D rendering, optionally compressed.
</brief_description>
<description>
+ A cubemap that is loaded from a [code].ccube[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedCubemap] can use one of 4 compresson methods:
+ - Uncompressed (uncompressed on the GPU)
+ - Lossless (WebP or PNG, uncompressed on the GPU)
+ - Lossy (WebP, uncompressed on the GPU)
+ - VRAM Compressed (compressed on the GPU)
+ Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
+ Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
+ See [Cubemap] for a general description of cubemaps.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/CompressedCubemapArray.xml b/doc/classes/CompressedCubemapArray.xml
index ff096cea47..4221241910 100644
--- a/doc/classes/CompressedCubemapArray.xml
+++ b/doc/classes/CompressedCubemapArray.xml
@@ -1,8 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CompressedCubemapArray" inherits="CompressedTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Array of 6-sided textures typically used in 3D rendering, optionally compressed.
</brief_description>
<description>
+ A cubemap array that is loaded from a [code].ccubearray[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedCubemapArray] can use one of 4 compresson methods:
+ - Uncompressed (uncompressed on the GPU)
+ - Lossless (WebP or PNG, uncompressed on the GPU)
+ - Lossy (WebP, uncompressed on the GPU)
+ - VRAM Compressed (compressed on the GPU)
+ Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
+ Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
+ See [CubemapArray] for a general description of cubemap arrays.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/CompressedTexture2D.xml b/doc/classes/CompressedTexture2D.xml
index f74265b8d5..660062af7b 100644
--- a/doc/classes/CompressedTexture2D.xml
+++ b/doc/classes/CompressedTexture2D.xml
@@ -1,10 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CompressedTexture2D" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- A [code].ctex[/code] texture.
+ Texture with 2 dimensions, optionally compressed.
</brief_description>
<description>
- A texture that is loaded from a [code].ctex[/code] file.
+ A texture that is loaded from a [code].ctex[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedTexture2D] can use one of 4 compression methods (including a lack of any compression):
+ - Uncompressed (uncompressed on the GPU)
+ - Lossless (WebP or PNG, uncompressed on the GPU)
+ - Lossy (WebP, uncompressed on the GPU)
+ - VRAM Compressed (compressed on the GPU)
+ Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
+ Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
</description>
<tutorials>
</tutorials>
@@ -13,13 +19,14 @@
<return type="int" enum="Error" />
<param index="0" name="path" type="String" />
<description>
- Loads the texture from the given path.
+ Loads the texture from the specified [param path].
</description>
</method>
</methods>
<members>
<member name="load_path" type="String" setter="load" getter="get_load_path" default="&quot;&quot;">
- The CompressedTexture's file path to a [code].ctex[/code] file.
+ The [CompressedTexture2D]'s file path to a [code].ctex[/code] file.
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
</members>
</class>
diff --git a/doc/classes/CompressedTexture2DArray.xml b/doc/classes/CompressedTexture2DArray.xml
index 0c751759af..0bd894a2da 100644
--- a/doc/classes/CompressedTexture2DArray.xml
+++ b/doc/classes/CompressedTexture2DArray.xml
@@ -1,8 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CompressedTexture2DArray" inherits="CompressedTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Array of 2-dimensional textures, optionally compressed.
</brief_description>
<description>
+ A texture array that is loaded from a [code].ctexarray[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedTexture2DArray] can use one of 4 compresson methods:
+ - Uncompressed (uncompressed on the GPU)
+ - Lossless (WebP or PNG, uncompressed on the GPU)
+ - Lossy (WebP, uncompressed on the GPU)
+ - VRAM Compressed (compressed on the GPU)
+ Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
+ Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
+ See [Texture2DArray] for a general description of texture arrays.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/CompressedTexture3D.xml b/doc/classes/CompressedTexture3D.xml
index 50bd025861..b11583b684 100644
--- a/doc/classes/CompressedTexture3D.xml
+++ b/doc/classes/CompressedTexture3D.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CompressedTexture3D" inherits="Texture3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Texture with 3 dimensions, optionally compressed.
</brief_description>
<description>
+ [CompressedTexture3D] is the VRAM-compressed counterpart of [ImageTexture3D]. The file extension for [CompressedTexture3D] files is [code].ctex3d[/code]. This file format is internal to Godot; it is created by importing other image formats with the import system.
+ [CompressedTexture3D] uses VRAM compression, which allows to reduce memory usage on the GPU when rendering the texture. This also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
+ See [Texture3D] for a general description of 3D textures.
</description>
<tutorials>
</tutorials>
@@ -11,11 +15,13 @@
<return type="int" enum="Error" />
<param index="0" name="path" type="String" />
<description>
+ Loads the texture from the specified [param path].
</description>
</method>
</methods>
<members>
<member name="load_path" type="String" setter="load" getter="get_load_path" default="&quot;&quot;">
+ The [CompressedTexture3D]'s file path to a [code].ctex3d[/code] file.
</member>
</members>
</class>
diff --git a/doc/classes/CompressedTextureLayered.xml b/doc/classes/CompressedTextureLayered.xml
index 547679c0f0..376483ae5c 100644
--- a/doc/classes/CompressedTextureLayered.xml
+++ b/doc/classes/CompressedTextureLayered.xml
@@ -1,8 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CompressedTextureLayered" inherits="TextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Base class for texture arrays that can optionally be compressed.
</brief_description>
<description>
+ A texture array that is loaded from a [code].ctexarray[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedTexture2D] can use one of 4 compresson methods:
+ - Uncompressed (uncompressed on the GPU)
+ - Lossless (WebP or PNG, uncompressed on the GPU)
+ - Lossy (WebP, uncompressed on the GPU)
+ - VRAM Compressed (compressed on the GPU)
+ Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
+ Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
</description>
<tutorials>
</tutorials>
@@ -11,11 +19,13 @@
<return type="int" enum="Error" />
<param index="0" name="path" type="String" />
<description>
+ Loads the texture at [param path].
</description>
</method>
</methods>
<members>
<member name="load_path" type="String" setter="load" getter="get_load_path" default="&quot;&quot;">
+ The path the texture should be loaded from.
</member>
</members>
</class>
diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml
index 7ba53f852b..4e60df6b96 100644
--- a/doc/classes/ConfigFile.xml
+++ b/doc/classes/ConfigFile.xml
@@ -163,7 +163,7 @@
<param index="0" name="path" type="String" />
<description>
Loads the config file specified as a parameter. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="load_encrypted">
@@ -172,7 +172,7 @@
<param index="1" name="key" type="PackedByteArray" />
<description>
Loads the encrypted config file specified as a parameter, using the provided [param key] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="load_encrypted_pass">
@@ -181,7 +181,7 @@
<param index="1" name="password" type="String" />
<description>
Loads the encrypted config file specified as a parameter, using the provided [param password] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="parse">
@@ -189,7 +189,7 @@
<param index="0" name="data" type="String" />
<description>
Parses the passed string as the contents of a config file. The string is parsed and loaded in the ConfigFile object which the method was called on.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="save">
@@ -197,7 +197,7 @@
<param index="0" name="path" type="String" />
<description>
Saves the contents of the [ConfigFile] object to the file specified as a parameter. The output file uses an INI-style structure.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="save_encrypted">
@@ -206,7 +206,7 @@
<param index="1" name="key" type="PackedByteArray" />
<description>
Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [param key] to encrypt it. The output file uses an INI-style structure.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="save_encrypted_pass">
@@ -215,7 +215,7 @@
<param index="1" name="password" type="String" />
<description>
Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [param password] to encrypt it. The output file uses an INI-style structure.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="set_value">
diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml
index d4c503857d..48b4df9126 100644
--- a/doc/classes/ConfirmationDialog.xml
+++ b/doc/classes/ConfirmationDialog.xml
@@ -8,10 +8,10 @@
To get cancel action, you can use:
[codeblocks]
[gdscript]
- get_cancel().connect("pressed", self, "cancelled")
+ get_cancel_button().pressed.connect(self.cancelled)
[/gdscript]
[csharp]
- GetCancel().Connect("pressed", this, nameof(Cancelled));
+ GetCancelButton().Pressed += Cancelled;
[/csharp]
[/codeblocks]
</description>
diff --git a/doc/classes/Container.xml b/doc/classes/Container.xml
index a13e1598b2..0e1ef02573 100644
--- a/doc/classes/Container.xml
+++ b/doc/classes/Container.xml
@@ -14,14 +14,14 @@
<method name="_get_allowed_size_flags_horizontal" qualifiers="virtual const">
<return type="PackedInt32Array" />
<description>
- Implement to return a list of allowed horizontal [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the inspector dock.
+ Implement to return a list of allowed horizontal [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the Inspector dock.
[b]Note:[/b] Having no size flags is equal to having [constant Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed.
</description>
</method>
<method name="_get_allowed_size_flags_vertical" qualifiers="virtual const">
<return type="PackedInt32Array" />
<description>
- Implement to return a list of allowed vertical [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the inspector dock.
+ Implement to return a list of allowed vertical [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the Inspector dock.
[b]Note:[/b] Having no size flags is equal to having [constant Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed.
</description>
</method>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 9c7cb7b089..2159001a30 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -12,7 +12,7 @@
Call [method accept_event] so no other node receives the event. Once you accept an input, it becomes handled so [method Node._unhandled_input] will not process it.
Only one [Control] node can be in focus. Only the node in focus will receive events. To get the focus, call [method grab_focus]. [Control] nodes lose focus when another node grabs it, or if you hide the node in focus.
Sets [member mouse_filter] to [constant MOUSE_FILTER_IGNORE] to tell a [Control] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button.
- [Theme] resources change the Control's appearance. If you change the [Theme] on a [Control] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_theme_*_override[/code] methods, like [method add_theme_font_override]. You can override the theme with the inspector.
+ [Theme] resources change the Control's appearance. If you change the [Theme] on a [Control] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_theme_*_override[/code] methods, like [method add_theme_font_override]. You can override the theme with the Inspector.
[b]Note:[/b] Theme items are [i]not[/i] [Object] properties. This means you can't access their values using [method Object.get] and [method Object.set]. Instead, use the [code]get_theme_*[/code] and [code]add_theme_*_override[/code] methods provided by this class.
</description>
<tutorials>
@@ -110,7 +110,7 @@
<param index="0" name="event" type="InputEvent" />
<description>
Virtual method to be implemented by the user. Use this method to process and accept inputs on UI elements. See [method accept_event].
- Example: clicking a control.
+ [b]Example usage for clicking a control:[/b]
[codeblocks]
[gdscript]
func _gui_input(event):
@@ -159,7 +159,7 @@
The returned node will be added as child to a [PopupPanel], so you should only provide the contents of that panel. That [PopupPanel] can be themed using [method Theme.set_stylebox] for the type [code]"TooltipPanel"[/code] (see [member tooltip_text] for an example).
[b]Note:[/b] The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its [member custom_minimum_size] to some non-zero value.
[b]Note:[/b] The node (and any relevant children) should be [member CanvasItem.visible] when returned, otherwise, the viewport that instantiates it will not be able to calculate its minimum size reliably.
- Example of usage with a custom-constructed node:
+ [b]Example of usage with a custom-constructed node:[/b]
[codeblocks]
[gdscript]
func _make_custom_tooltip(for_text):
@@ -176,7 +176,7 @@
}
[/csharp]
[/codeblocks]
- Example of usage with a custom scene instance:
+ [b]Example of usage with a custom scene instance:[/b]
[codeblocks]
[gdscript]
func _make_custom_tooltip(for_text):
@@ -201,7 +201,7 @@
<param index="1" name="text" type="String" />
<description>
User defined BiDi algorithm override function.
- Returns [code]Array[/code] of [code]Vector2i[/code] text ranges, in the left-to-right order. Ranges should cover full source [param text] without overlaps. BiDi algorithm will be used on each range separately.
+ Returns an [Array] of [Vector2i] text ranges, in the left-to-right order. Ranges should cover full source [param text] without overlaps. BiDi algorithm will be used on each range separately.
</description>
</method>
<method name="accept_event">
@@ -383,7 +383,7 @@
<method name="get_global_rect" qualifiers="const">
<return type="Rect2" />
<description>
- Returns the position and size of the control relative to the top-left corner of the screen. See [member position] and [member size].
+ Returns the position and size of the control relative to the [CanvasLayer]. See [member global_position] and [member size].
</description>
</method>
<method name="get_minimum_size" qualifiers="const">
@@ -422,7 +422,7 @@
<description>
Returns the position of this [Control] in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins.
Equals to [member global_position] if the window is embedded (see [member Viewport.gui_embed_subwindows]).
- Example usage for showing a popup:
+ [b]Example usage for showing a popup:[/b]
[codeblock]
popup_menu.position = get_screen_position() + get_local_mouse_position()
popup_menu.reset_size()
@@ -528,7 +528,7 @@
<param index="0" name="at_position" type="Vector2" default="Vector2(0, 0)" />
<description>
Returns the tooltip text [param at_position] in local coordinates, which will typically appear when the cursor is resting over this control. By default, it returns [member tooltip_text].
- [b]Note:[/b] This method can be overridden to customise its behaviour. If this method returns an empty [String], no tooltip is displayed.
+ [b]Note:[/b] This method can be overridden to customize its behavior. If this method returns an empty [String], no tooltip is displayed.
</description>
</method>
<method name="grab_click_focus">
@@ -916,7 +916,7 @@
<param index="2" name="margin" type="int" default="0" />
<description>
Sets the offsets to a [param preset] from [enum Control.LayoutPreset] enum. This is the code equivalent to using the Layout menu in the 2D editor.
- Use parameter [param resize_mode] with constants from [enum Control.LayoutPresetMode] to better determine the resulting size of the [Control]. Constant size will be ignored if used with presets that change size, e.g. [code]PRESET_LEFT_WIDE[/code].
+ Use parameter [param resize_mode] with constants from [enum Control.LayoutPresetMode] to better determine the resulting size of the [Control]. Constant size will be ignored if used with presets that change size, e.g. [constant PRESET_LEFT_WIDE].
Use parameter [param margin] to determine the gap between the [Control] and the edges.
</description>
</method>
@@ -972,34 +972,34 @@
<member name="clip_contents" type="bool" setter="set_clip_contents" getter="is_clipping_contents" default="false">
Enables whether rendering of [CanvasItem] based children should be clipped to this control's rectangle. If [code]true[/code], parts of a child which would be visibly outside of this control's rectangle will not be rendered and won't receive input.
</member>
- <member name="custom_minimum_size" type="Vector2i" setter="set_custom_minimum_size" getter="get_custom_minimum_size" default="Vector2i(0, 0)">
+ <member name="custom_minimum_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size" default="Vector2(0, 0)">
The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode" default="0">
The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard, gamepad, and mouse signals.
</member>
<member name="focus_neighbor_bottom" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath(&quot;&quot;)">
- Tells Godot which node it should give focus to if the user presses the down arrow on the keyboard or down on a gamepad by default. You can change the key by editing the [code]ui_down[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
+ Tells Godot which node it should give focus to if the user presses the down arrow on the keyboard or down on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_down] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
</member>
<member name="focus_neighbor_left" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath(&quot;&quot;)">
- Tells Godot which node it should give focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the [code]ui_left[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the left of this one.
+ Tells Godot which node it should give focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_left] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the left of this one.
</member>
<member name="focus_neighbor_right" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath(&quot;&quot;)">
- Tells Godot which node it should give focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [code]ui_right[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
+ Tells Godot which node it should give focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_right] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
</member>
<member name="focus_neighbor_top" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath(&quot;&quot;)">
- Tells Godot which node it should give focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the [code]ui_top[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
+ Tells Godot which node it should give focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_up] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
</member>
<member name="focus_next" type="NodePath" setter="set_focus_next" getter="get_focus_next" default="NodePath(&quot;&quot;)">
- Tells Godot which node it should give focus to if the user presses [kbd]Tab[/kbd] on a keyboard by default. You can change the key by editing the [code]ui_focus_next[/code] input action.
+ Tells Godot which node it should give focus to if the user presses [kbd]Tab[/kbd] on a keyboard by default. You can change the key by editing the [member ProjectSettings.input/ui_focus_next] input action.
If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree.
</member>
<member name="focus_previous" type="NodePath" setter="set_focus_previous" getter="get_focus_previous" default="NodePath(&quot;&quot;)">
- Tells Godot which node it should give focus to if the user presses [kbd]Shift + Tab[/kbd] on a keyboard by default. You can change the key by editing the [code]ui_focus_prev[/code] input action.
+ Tells Godot which node it should give focus to if the user presses [kbd]Shift + Tab[/kbd] on a keyboard by default. You can change the key by editing the [member ProjectSettings.input/ui_focus_prev] input action.
If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree.
</member>
<member name="global_position" type="Vector2" setter="_set_global_position" getter="get_global_position">
- The node's global position, relative to the world (usually to the top-left corner of the window).
+ The node's global position, relative to the world (usually to the [CanvasLayer]).
</member>
<member name="grow_horizontal" type="int" setter="set_h_grow_direction" getter="get_h_grow_direction" enum="Control.GrowDirection" default="1">
Controls the direction on the horizontal axis in which the control should grow if its horizontal minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size.
@@ -1019,7 +1019,7 @@
</member>
<member name="mouse_force_pass_scroll_events" type="bool" setter="set_force_pass_scroll_events" getter="is_force_pass_scroll_events" default="true">
When enabled, scroll wheel events processed by [method _gui_input] will be passed to the parent control even if [member mouse_filter] is set to [constant MOUSE_FILTER_STOP]. As it defaults to true, this allows nested scrollable containers to work out of the box.
- You should disable it on the root of your UI if you do not want scroll events to go to the [code]_unhandled_input[/code] processing.
+ You should disable it on the root of your UI if you do not want scroll events to go to the [method Node._unhandled_input] processing.
</member>
<member name="offset_bottom" type="float" setter="set_offset" getter="get_offset" default="0.0">
Distance between the node's bottom edge and its parent control, based on [member anchor_bottom].
@@ -1048,9 +1048,12 @@
</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">
+ The [Node] which must be a parent of the focused [Control] for the shortcut to be activated. If [code]null[/code], the shortcut can be activated when any control is focused (a global shortcut). This allows shortcuts to be accepted only when the user has a certain area of the GUI focused.
+ </member>
<member name="size" type="Vector2" setter="_set_size" getter="get_size" default="Vector2(0, 0)">
The size of the node's bounding rectangle, in pixels. [Container] nodes update this property automatically.
</member>
@@ -1073,7 +1076,7 @@
[b]Note:[/b] Theme items are looked for in the tree order, from branch to root, where each [Control] node is checked for its [member theme] property. The earliest match against any type/class name is returned. The project-level Theme and the default Theme are checked last.
</member>
<member name="tooltip_text" type="String" setter="set_tooltip_text" getter="get_tooltip_text" default="&quot;&quot;">
- The default tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the [member mouse_filter] property is not [constant MOUSE_FILTER_IGNORE]. The time required for the tooltip to appear can be changed with the [code]gui/timers/tooltip_delay_sec[/code] option in Project Settings. See also [method get_tooltip].
+ The default tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the [member mouse_filter] property is not [constant MOUSE_FILTER_IGNORE]. The time required for the tooltip to appear can be changed with the [member ProjectSettings.gui/timers/tooltip_delay_sec] option. See also [method get_tooltip].
The tooltip popup will use either a default implementation, or a custom one that you can provide by overriding [method _make_custom_tooltip]. The default tooltip includes a [PopupPanel] and [Label] whose theme properties can be customized using [Theme] methods with the [code]"TooltipPanel"[/code] and [code]"TooltipLabel"[/code] respectively. For example:
[codeblocks]
[gdscript]
@@ -1327,7 +1330,7 @@
The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls.
</constant>
<constant name="MOUSE_FILTER_PASS" value="1" enum="MouseFilter">
- The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. If no control handled it, the event will be passed to `_unhandled_input` for further processing.
+ The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. If no control handled it, the event will be passed to [method Node._unhandled_input] for further processing.
</constant>
<constant name="MOUSE_FILTER_IGNORE" value="2" enum="MouseFilter">
The control will not receive mouse button input events through [method _gui_input]. The control will also not receive the [signal mouse_entered] nor [signal mouse_exited] signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically.
diff --git a/doc/classes/Cubemap.xml b/doc/classes/Cubemap.xml
index 0cdebeda95..46ddede9b1 100644
--- a/doc/classes/Cubemap.xml
+++ b/doc/classes/Cubemap.xml
@@ -4,8 +4,9 @@
6-sided texture typically used in 3D rendering.
</brief_description>
<description>
- A cubemap is made of 6 textures organized in layers. They are typically used for faking reflections (see [ReflectionProbe]) in 3D rendering. It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods.
- This resource is typically used as a uniform in custom shaders. Few core Godot methods make use of Cubemap resources.
+ A cubemap is made of 6 textures organized in layers. They are typically used for faking reflections in 3D rendering (see [ReflectionProbe]). It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods.
+ This resource is typically used as a uniform in custom shaders. Few core Godot methods make use of [Cubemap] resources.
+ To create such a texture file yourself, reimport your image files using the Godot Editor import presets.
[b]Note:[/b] Godot doesn't support using cubemaps in a [PanoramaSkyMaterial]. You can use [url=https://danilw.github.io/GLSL-howto/cubemap_to_panorama_js/cubemap_to_panorama.html]this tool[/url] to convert a cubemap to an equirectangular sky map.
</description>
<tutorials>
diff --git a/doc/classes/CubemapArray.xml b/doc/classes/CubemapArray.xml
index 07e401a13d..2fd55b66c6 100644
--- a/doc/classes/CubemapArray.xml
+++ b/doc/classes/CubemapArray.xml
@@ -5,8 +5,9 @@
</brief_description>
<description>
[CubemapArray]s are made of an array of [Cubemap]s. Accordingly, like [Cubemap]s they are made of multiple textures the amount of which must be divisible by 6 (one image for each face of the cube). The primary benefit of [CubemapArray]s is that they can be accessed in shader code using a single texture reference. In other words, you can pass multiple [Cubemap]s into a shader using a single [CubemapArray].
- Generally, [CubemapArray]s provide a more efficient way for storing multiple [Cubemap]s, than storing multiple [Cubemap]s themselves in an array.
- Internally Godot, uses [CubemapArray]s for many effects including the [Sky], if you set [member ProjectSettings.rendering/reflections/sky_reflections/texture_array_reflections] to [code]true[/code].
+ Generally, [CubemapArray]s provide a more efficient way for storing multiple [Cubemap]s compared to storing multiple [Cubemap]s themselves in an array.
+ Internally, Godot uses [CubemapArray]s for many effects including the [Sky], if you set [member ProjectSettings.rendering/reflections/sky_reflections/texture_array_reflections] to [code]true[/code].
+ To create such a texture file yourself, reimport your image files using the Godot Editor import presets.
[b]Note:[/b] [CubemapArray] is not supported in the OpenGL 3 rendering backend.
</description>
<tutorials>
diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml
index 20b9dafd0d..d5864f30fa 100644
--- a/doc/classes/Curve.xml
+++ b/doc/classes/Curve.xml
@@ -30,7 +30,7 @@
<method name="clean_dupes">
<return type="void" />
<description>
- Removes points that are closer than [code]CMP_EPSILON[/code] (0.00001) units to their neighbor on the curve.
+ Removes duplicate points, i.e. points that are less than 0.00001 units (engine epsilon value) away from their neighbor on the curve.
</description>
</method>
<method name="clear_points">
diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml
index cc4124d084..ccdf085319 100644
--- a/doc/classes/Curve2D.xml
+++ b/doc/classes/Curve2D.xml
@@ -102,6 +102,22 @@
Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).
</description>
</method>
+ <method name="sample_baked_with_rotation" qualifiers="const">
+ <return type="Transform2D" />
+ <param index="0" name="offset" type="float" />
+ <param index="1" name="cubic" type="bool" default="false" />
+ <param index="2" name="loop" type="bool" default="true" />
+ <param index="3" name="lookahead" type="float" default="4.0" />
+ <description>
+ Similar to [method sample_baked], but returns [Transform2D] that includes a rotation along the curve. Returns empty transform if length of the curve is [code]0[/code].
+ Use [param loop] to smooth the tangent at the end of the curve. [param lookahead] defines the distance to a nearby point for calculating the tangent vector.
+ [codeblock]
+ var transform = curve.sample_baked_with_rotation(offset)
+ position = transform.get_origin()
+ rotation = transform.get_rotation()
+ [/codeblock]
+ </description>
+ </method>
<method name="samplef" qualifiers="const">
<return type="Vector2" />
<param index="0" name="fofs" type="float" />
diff --git a/doc/classes/CurveTexture.xml b/doc/classes/CurveTexture.xml
index 85473fc237..03e008d738 100644
--- a/doc/classes/CurveTexture.xml
+++ b/doc/classes/CurveTexture.xml
@@ -13,6 +13,7 @@
<member name="curve" type="Curve" setter="set_curve" getter="get_curve">
The [Curve] that is rendered onto the texture.
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
<member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="CurveTexture.TextureMode" default="0">
The format the texture should be generated with. When passing a CurveTexture as a input to a [Shader], this may need to be adjusted.
</member>
diff --git a/doc/classes/CurveXYZTexture.xml b/doc/classes/CurveXYZTexture.xml
index e3f2e8fc45..8c4e2dce0f 100644
--- a/doc/classes/CurveXYZTexture.xml
+++ b/doc/classes/CurveXYZTexture.xml
@@ -19,6 +19,7 @@
<member name="curve_z" type="Curve" setter="set_curve_z" getter="get_curve_z">
The [Curve] that is rendered onto the texture's blue channel.
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
<member name="width" type="int" setter="set_width" getter="get_width" default="256">
The width of the texture (in pixels). Higher values make it possible to represent high-frequency data better (such as sudden direction changes), at the cost of increased generation time and memory usage.
</member>
diff --git a/doc/classes/CylinderShape3D.xml b/doc/classes/CylinderShape3D.xml
index 6ff142da59..dcb14ec945 100644
--- a/doc/classes/CylinderShape3D.xml
+++ b/doc/classes/CylinderShape3D.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
Cylinder shape for collisions. Like [CapsuleShape3D], but without hemispheres at the cylinder's ends.
+ [b]Note:[/b] There are several known bugs with cylinder collision shapes. Using [CapsuleShape3D] or [BoxShape3D] instead is recommended.
[b]Performance:[/b] Being a primitive collision shape, [CylinderShape3D] is fast to check collisions against (though not as fast as [SphereShape3D]). [CylinderShape3D] is also more demanding compared to [CapsuleShape3D].
</description>
<tutorials>
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index a86aff060d..9842288d35 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -325,18 +325,21 @@
<return type="bool" />
<param index="0" name="right" type="Dictionary" />
<description>
+ Returns [code]true[/code] if the dictionaries differ, i.e. their key or value lists are different (including the order).
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
<param index="0" name="right" type="Dictionary" />
<description>
+ Returns [code]true[/code] if both dictionaries have the same contents, i.e. their keys list and value list are equal.
</description>
</operator>
<operator name="operator []">
<return type="Variant" />
<param index="0" name="key" type="Variant" />
<description>
+ Returns a value at the given [param key] or [code]null[/code] and error if the key does not exist. For safe access, use [method get] or [method has].
</description>
</operator>
</operators>
diff --git a/doc/classes/DirAccess.xml b/doc/classes/DirAccess.xml
index 7d1612e59c..181d2eb485 100644
--- a/doc/classes/DirAccess.xml
+++ b/doc/classes/DirAccess.xml
@@ -70,7 +70,7 @@
<param index="0" name="to_dir" type="String" />
<description>
Changes the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. [code]newdir[/code] or [code]../newdir[/code]), or an absolute path (e.g. [code]/tmp/newdir[/code] or [code]res://somedir/newdir[/code]).
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="copy">
@@ -81,7 +81,7 @@
<description>
Copies the [param from] file to the [param to] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten.
If [param chmod_flags] is different than [code]-1[/code], the Unix permissions for the destination path will be set to the provided value, if available on the current operating system.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="copy_absolute" qualifiers="static">
@@ -221,7 +221,7 @@
<param index="0" name="path" type="String" />
<description>
Creates a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see [method make_dir_recursive]).
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="make_dir_absolute" qualifiers="static">
@@ -236,7 +236,7 @@
<param index="0" name="path" type="String" />
<description>
Creates a target directory and all necessary intermediate directories in its path, by calling [method make_dir] recursively. The argument can be relative to the current directory, or an absolute path.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="make_dir_recursive_absolute" qualifiers="static">
@@ -260,7 +260,7 @@
<description>
Permanently deletes the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail.
If you don't want to delete the file/directory permanently, use [method OS.move_to_trash] instead.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="remove_absolute" qualifiers="static">
@@ -276,7 +276,7 @@
<param index="1" name="to" type="String" />
<description>
Renames (move) the [param from] file or directory to the [param to] destination. Both arguments should be paths to files or directories, either relative or absolute. If the destination file or directory exists and is not access-protected, it will be overwritten.
- Returns one of the [enum Error] code constants ([code]OK[/code] on success).
+ Returns one of the [enum Error] code constants ([constant OK] on success).
</description>
</method>
<method name="rename_absolute" qualifiers="static">
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 0dbaa9c86f..0039301bf6 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="DisplayServer" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Singleton for window management functions.
</brief_description>
<description>
+ [DisplayServer] handles everything related to window management. This is separated from [OS] as a single operating system may support multiple display servers.
+ [b]Headless mode:[/b] Starting the engine with the [code]--headless[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url] disables all rendering and window management functions. Most functions from [DisplayServer] will return dummy values in this case.
</description>
<tutorials>
</tutorials>
@@ -16,8 +19,8 @@
<method name="clipboard_get_primary" qualifiers="const">
<return type="String" />
<description>
- Returns the user's primary clipboard as a string if possible.
- [b]Note:[/b] This method is only implemented on Linux.
+ Returns the user's [url=https://unix.stackexchange.com/questions/139191/whats-the-difference-between-primary-selection-and-clipboard-buffer]primary[/url] clipboard as a string if possible. This is the clipboard that is set when the user selects text in any application, rather than when pressing [kbd]Ctrl + C[/kbd]. The clipboard data can then be pasted by clicking the middle mouse button in any application that supports the primary clipboard mechanism.
+ [b]Note:[/b] This method is only implemented on Linux (X11).
</description>
</method>
<method name="clipboard_has" qualifiers="const">
@@ -37,22 +40,14 @@
<return type="void" />
<param index="0" name="clipboard_primary" type="String" />
<description>
- Sets the user's primary clipboard content to the given string.
- [b]Note:[/b] This method is only implemented on Linux.
- </description>
- </method>
- <method name="create_sub_window">
- <return type="int" />
- <param index="0" name="mode" type="int" enum="DisplayServer.WindowMode" />
- <param index="1" name="vsync_mode" type="int" enum="DisplayServer.VSyncMode" />
- <param index="2" name="flags" type="int" />
- <param index="3" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)" />
- <description>
+ Sets the user's [url=https://unix.stackexchange.com/questions/139191/whats-the-difference-between-primary-selection-and-clipboard-buffer]primary[/url] clipboard content to the given string. This is the clipboard that is set when the user selects text in any application, rather than when pressing [kbd]Ctrl + C[/kbd]. The clipboard data can then be pasted by clicking the middle mouse button in any application that supports the primary clipboard mechanism.
+ [b]Note:[/b] This method is only implemented on Linux (X11).
</description>
</method>
<method name="cursor_get_shape" qualifiers="const">
<return type="int" enum="DisplayServer.CursorShape" />
<description>
+ Returns the default mouse cursor shape set by [method cursor_set_shape].
</description>
</method>
<method name="cursor_set_custom_image">
@@ -61,18 +56,14 @@
<param index="1" name="shape" type="int" enum="DisplayServer.CursorShape" default="0" />
<param index="2" name="hotspot" type="Vector2" default="Vector2(0, 0)" />
<description>
+ Sets a custom mouse cursor image for the defined [param shape]. This means the user's operating system and mouse cursor theme will no longer influence the mouse cursor's appearance. The image must be [code]256x256[/code] or smaller for correct appearance. [param hotspot] can optionally be set to define the area where the cursor will click. By default, [param hotspot] is set to [code]Vector2(0, 0)[/code], which is the top-left corner of the image. See also [method cursor_set_shape].
</description>
</method>
<method name="cursor_set_shape">
<return type="void" />
<param index="0" name="shape" type="int" enum="DisplayServer.CursorShape" />
<description>
- </description>
- </method>
- <method name="delete_sub_window">
- <return type="void" />
- <param index="0" name="window_id" type="int" />
- <description>
+ Sets the default mouse cursor shape. The cursor's appearance will vary depending on the user's operating system and mouse cursor theme. See also [method cursor_get_shape] and [method cursor_set_custom_image].
</description>
</method>
<method name="dialog_input_text">
@@ -82,6 +73,8 @@
<param index="2" name="existing_text" type="String" />
<param index="3" name="callback" type="Callable" />
<description>
+ Shows a text input dialog which uses the operating system's native look-and-feel. [param callback] will be called with a [String] argument equal to the text field's contents when the dialog is closed for any reason.
+ [b]Note:[/b] This method is implemented on macOS.
</description>
</method>
<method name="dialog_show">
@@ -91,17 +84,23 @@
<param index="2" name="buttons" type="PackedStringArray" />
<param index="3" name="callback" type="Callable" />
<description>
+ Shows a text dialog which uses the operating system's native look-and-feel. [param callback] will be called when the dialog is closed for any reason.
+ [b]Note:[/b] This method is implemented on macOS.
</description>
</method>
<method name="enable_for_stealing_focus">
<return type="void" />
<param index="0" name="process_id" type="int" />
<description>
+ Allows the [param process_id] PID to steal focus from this window. In other words, this disables the operating system's focus stealing protection for the specified PID.
+ [b]Note:[/b] This method is implemented on Windows.
</description>
</method>
<method name="force_process_and_drop_events">
<return type="void" />
<description>
+ Forces window manager processing while ignoring all [InputEvent]s. See also [method process_events].
+ [b]Note:[/b] This method is implemented on Windows and macOS.
</description>
</method>
<method name="get_accent_color" qualifiers="const">
@@ -127,27 +126,43 @@
<method name="get_name" qualifiers="const">
<return type="String" />
<description>
+ Returns the name of the [DisplayServer] currently in use. Most operating systems only have a single [DisplayServer], but Linux has access to more than one [DisplayServer] (although only X11 is currently implemented in Godot).
+ The names of built-in display servers are [code]Windows[/code], [code]macOS[/code], [code]X11[/code] (Linux), [code]Android[/code], [code]iOS[/code], [code]web[/code] (HTML5) and [code]headless[/code] (when started with the [code]--headless[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]).
</description>
</method>
<method name="get_screen_count" qualifiers="const">
<return type="int" />
<description>
+ Returns the number of displays available.
</description>
</method>
<method name="get_swap_cancel_ok">
<return type="bool" />
<description>
+ Returns [code]true[/code] if positions of [b]OK[/b] and [b]Cancel[/b] buttons are swapped in dialogs. This is enabled by default on Windows and UWP to follow interface conventions, and be toggled by changing [member ProjectSettings.gui/common/swap_cancel_ok].
+ [b]Note:[/b] This doesn't affect native dialogs such as the ones spawned by [method DisplayServer.dialog_show].
</description>
</method>
<method name="get_window_at_screen_position" qualifiers="const">
<return type="int" />
<param index="0" name="position" type="Vector2i" />
<description>
+ Returns the ID of the window at the specified screen [param position] (in pixels). On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this:
+ [codeblock]
+ * (0, 0) +-------+
+ | |
+ +-------------+ | |
+ | | | |
+ | | | |
+ +-------------+ +-------+
+ [/codeblock]
</description>
</method>
<method name="get_window_list" qualifiers="const">
<return type="PackedInt32Array" />
<description>
+ Returns the list of Godot window IDs belonging to this process.
+ [b]Note:[/b] Native dialogs are not included in this list.
</description>
</method>
<method name="global_menu_add_check_item">
@@ -362,6 +377,14 @@
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
+ <method name="global_menu_get_item_count" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="menu_root" type="String" />
+ <description>
+ Returns number of items in the global menu with ID [param menu_root].
+ [b]Note:[/b] This method is implemented on macOS.
+ </description>
+ </method>
<method name="global_menu_get_item_icon" qualifiers="const">
<return type="Texture2D" />
<param index="0" name="menu_root" type="String" />
@@ -665,37 +688,42 @@
<return type="bool" />
<param index="0" name="feature" type="int" enum="DisplayServer.Feature" />
<description>
+ Returns [code]true[/code] if the specified [param feature] is supported by the current [DisplayServer], [code]false[/code] otherwise.
</description>
</method>
<method name="ime_get_selection" qualifiers="const">
<return type="Vector2i" />
<description>
+ Returns the text selection in the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] composition string, with the [Vector2i]'s [code]x[/code] component being the caret position and [code]y[/code] being the length of the selection.
+ [b]Note:[/b] This method is implemented on macOS.
</description>
</method>
<method name="ime_get_text" qualifiers="const">
<return type="String" />
<description>
+ Returns the composition string contained within the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] window.
+ [b]Note:[/b] This method is implemented on macOS.
</description>
</method>
<method name="is_dark_mode" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if OS is using dark mode.
- [b]Note:[/b] This method is implemented on macOS, Windows and Linux.
+ [b]Note:[/b] This method is implemented on macOS, Windows and Linux (X11).
</description>
</method>
<method name="is_dark_mode_supported" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if OS supports dark mode.
- [b]Note:[/b] This method is implemented on macOS, Windows and Linux.
+ [b]Note:[/b] This method is implemented on macOS, Windows and Linux (X11).
</description>
</method>
<method name="keyboard_get_current_layout" qualifiers="const">
<return type="int" />
<description>
Returns active keyboard layout index.
- [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
+ [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
</description>
</method>
<method name="keyboard_get_keycode_from_physical" qualifiers="const">
@@ -703,14 +731,14 @@
<param index="0" name="keycode" type="int" enum="Key" />
<description>
Converts a physical (US QWERTY) [param keycode] to one in the active keyboard layout.
- [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
+ [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
</description>
</method>
<method name="keyboard_get_layout_count" qualifiers="const">
<return type="int" />
<description>
Returns the number of keyboard layouts.
- [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
+ [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
</description>
</method>
<method name="keyboard_get_layout_language" qualifiers="const">
@@ -718,7 +746,7 @@
<param index="0" name="index" type="int" />
<description>
Returns the ISO-639/BCP-47 language code of the keyboard layout at position [param index].
- [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
+ [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
</description>
</method>
<method name="keyboard_get_layout_name" qualifiers="const">
@@ -726,25 +754,27 @@
<param index="0" name="index" type="int" />
<description>
Returns the localized name of the keyboard layout at position [param index].
- [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
+ [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
</description>
</method>
<method name="keyboard_set_current_layout">
<return type="void" />
<param index="0" name="index" type="int" />
<description>
- Sets active keyboard layout.
- [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
+ Sets the active keyboard layout.
+ [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
</description>
</method>
<method name="mouse_get_button_state" qualifiers="const">
<return type="int" enum="MouseButton" />
<description>
+ Returns the current state of mouse buttons (whether each button is pressed) as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to [method Input.get_mouse_button_mask].
</description>
</method>
<method name="mouse_get_mode" qualifiers="const">
<return type="int" enum="DisplayServer.MouseMode" />
<description>
+ Returns the current mouse mode. See also [method mouse_set_mode].
</description>
</method>
<method name="mouse_get_position" qualifiers="const">
@@ -757,11 +787,13 @@
<return type="void" />
<param index="0" name="mouse_mode" type="int" enum="DisplayServer.MouseMode" />
<description>
+ Sets the current mouse mode. See also [method mouse_get_mode].
</description>
</method>
<method name="process_events">
<return type="void" />
<description>
+ Perform window manager processing, including input flushing. See also [method force_process_and_drop_events], [method Input.flush_buffered_events] and [member Input.use_accumulated_input].
</description>
</method>
<method name="screen_get_dpi" qualifiers="const">
@@ -779,7 +811,7 @@
xxhdpi - 480 dpi
xxxhdpi - 640 dpi
[/codeblock]
- [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. Returns [code]72[/code] on unsupported platforms.
+ [b]Note:[/b] This method is implemented on Android, Linux (X11), macOS and Windows. Returns [code]72[/code] on unsupported platforms.
</description>
</method>
<method name="screen_get_max_scale" qualifiers="const">
@@ -794,12 +826,24 @@
<return type="int" enum="DisplayServer.ScreenOrientation" />
<param index="0" name="screen" type="int" default="-1" />
<description>
+ Returns the [param screen]'s current orientation. See also [method screen_set_orientation].
+ [b]Note:[/b] This method is implemented on Android and iOS.
</description>
</method>
<method name="screen_get_position" qualifiers="const">
<return type="Vector2i" />
<param index="0" name="screen" type="int" default="-1" />
<description>
+ Returns the screen's top-left corner position in pixels. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this:
+ [codeblock]
+ * (0, 0) +-------+
+ | |
+ +-------------+ | |
+ | | | |
+ | | | |
+ +-------------+ +-------+
+ [/codeblock]
+ See also [method screen_get_size].
</description>
</method>
<method name="screen_get_refresh_rate" qualifiers="const">
@@ -829,29 +873,34 @@
<return type="Vector2i" />
<param index="0" name="screen" type="int" default="-1" />
<description>
+ Returns the screen's size in pixels. See also [method screen_get_position] and [method screen_get_usable_rect].
</description>
</method>
<method name="screen_get_usable_rect" qualifiers="const">
<return type="Rect2i" />
<param index="0" name="screen" type="int" default="-1" />
<description>
+ Returns the portion of the screen that is not obstructed by a status bar in pixels. See also [method screen_get_size].
</description>
</method>
<method name="screen_is_kept_on" qualifiers="const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if the screen should never be turned off by the operating system's power-saving measures. See also [method screen_set_keep_on].
</description>
</method>
<method name="screen_is_touchscreen" qualifiers="const">
<return type="bool" />
<param index="0" name="screen" type="int" default="-1" />
<description>
+ Returns [code]true[/code] if the screen can send touch events or if [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse] is [code]true[/code].
</description>
</method>
<method name="screen_set_keep_on">
<return type="void" />
<param index="0" name="enable" type="bool" />
<description>
+ Sets whether the screen should never be turned off by the operating system's power-saving measures. See also [method screen_is_kept_on].
</description>
</method>
<method name="screen_set_orientation">
@@ -859,18 +908,21 @@
<param index="0" name="orientation" type="int" enum="DisplayServer.ScreenOrientation" />
<param index="1" name="screen" type="int" default="-1" />
<description>
+ Sets the [param screen]'s [param orientation]. See also [method screen_get_orientation].
</description>
</method>
<method name="set_icon">
<return type="void" />
<param index="0" name="image" type="Image" />
<description>
+ Sets the window icon (usually displayed in the top-left corner) in the operating system's [i]native[/i] format. To use icons in the operating system's native format, use [method set_native_icon] instead.
</description>
</method>
<method name="set_native_icon">
<return type="void" />
<param index="0" name="filename" type="String" />
<description>
+ Sets the window icon (usually displayed in the top-left corner) in the operating system's [i]native[/i] format. The file at [param filename] must be in [code].ico[/code] format on Windows or [code].icns[/code] on macOS. By using specially crafted [code].ico[/code] or [code].icns[/code] icons, [method set_native_icon] allows specifying different icons depending on the size the icon is displayed at. This size is determined by the operating system and user preferences (including the display scale factor). To use icons in other formats, use [method set_icon] instead.
</description>
</method>
<method name="tablet_get_current_driver" qualifiers="const">
@@ -911,7 +963,7 @@
- [code]name[/code] is voice name.
- [code]id[/code] is voice identifier.
- [code]language[/code] is language code in [code]lang_Variant[/code] format. [code]lang[/code] part is a 2 or 3-letter code based on the ISO-639 standard, in lowercase. And [code]Variant[/code] part is an engine dependent string describing country, region or/and dialect.
- [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
</description>
</method>
<method name="tts_get_voices_for_language" qualifiers="const">
@@ -919,35 +971,35 @@
<param index="0" name="language" type="String" />
<description>
Returns an [PackedStringArray] of voice identifiers for the [param language].
- [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
</description>
</method>
<method name="tts_is_paused" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if the synthesizer is in a paused state.
- [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
</description>
</method>
<method name="tts_is_speaking" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if the synthesizer is generating speech, or have utterance waiting in the queue.
- [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
</description>
</method>
<method name="tts_pause">
<return type="void" />
<description>
Puts the synthesizer into a paused state.
- [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
</description>
</method>
<method name="tts_resume">
<return type="void" />
<description>
Resumes the synthesizer if it was paused.
- [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
</description>
</method>
<method name="tts_set_utterance_callback">
@@ -956,10 +1008,10 @@
<param index="1" name="callable" type="Callable" />
<description>
Adds a callback, which is called when the utterance has started, finished, canceled or reached a text boundary.
- - [code]TTS_UTTERANCE_STARTED[/code], [code]TTS_UTTERANCE_ENDED[/code], and [code]TTS_UTTERANCE_CANCELED[/code] callable's method should take one [int] parameter, the utterance id.
- - [code]TTS_UTTERANCE_BOUNDARY[/code] callable's method should take two [int] parameters, the index of the character and the utterance id.
+ - [constant TTS_UTTERANCE_STARTED], [constant TTS_UTTERANCE_ENDED], and [constant TTS_UTTERANCE_CANCELED] callable's method should take one [int] parameter, the utterance id.
+ - [constant TTS_UTTERANCE_BOUNDARY] callable's method should take two [int] parameters, the index of the character and the utterance id.
[b]Note:[/b] The granularity of the boundary callbacks is engine dependent.
- [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
</description>
</method>
<method name="tts_speak">
@@ -978,16 +1030,16 @@
- [param pitch] ranges from [code]0.0[/code] (lowest) to [code]2.0[/code] (highest), [code]1.0[/code] is default pitch for the current voice.
- [param rate] ranges from [code]0.1[/code] (lowest) to [code]10.0[/code] (highest), [code]1.0[/code] is a normal speaking rate. Other values act as a percentage relative.
- [param utterance_id] is passed as a parameter to the callback functions.
- [b]Note:[/b] On Windows and Linux, utterance [param text] can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling [method tts_speak].
+ [b]Note:[/b] On Windows and Linux (X11), utterance [param text] can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling [method tts_speak].
[b]Note:[/b] The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated.
- [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
</description>
</method>
<method name="tts_stop">
<return type="void" />
<description>
Stops synthesis in progress and removes all utterances from the queue.
- [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows.
+ [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
</description>
</method>
<method name="virtual_keyboard_get_height" qualifiers="const">
@@ -1028,17 +1080,11 @@
Sets the mouse cursor position to the given [param position] relative to an origin at the upper left corner of the currently focused game Window Manager window.
</description>
</method>
- <method name="window_attach_instance_id">
- <return type="void" />
- <param index="0" name="instance_id" type="int" />
- <param index="1" name="window_id" type="int" default="0" />
- <description>
- </description>
- </method>
<method name="window_can_draw" qualifiers="const">
<return type="bool" />
<param index="0" name="window_id" type="int" default="0" />
<description>
+ Returns [code]true[/code] if anything can be drawn in the window specified by [param window_id], [code]false[/code] otherwise. Using the [code]--disable-render-loop[/code] command line argument or a headless build will return [code]false[/code].
</description>
</method>
<method name="window_get_active_popup" qualifiers="const">
@@ -1051,12 +1097,14 @@
<return type="int" />
<param index="0" name="window_id" type="int" default="0" />
<description>
+ Returns the [method Object.get_instance_id] of the [Window] the [param window_id] is attached to. also [method window_get_attached_instance_id].
</description>
</method>
<method name="window_get_current_screen" qualifiers="const">
<return type="int" />
<param index="0" name="window_id" type="int" default="0" />
<description>
+ Returns the screen the window specified by [param window_id] is currently positioned on. If the screen overlaps multiple displays, the screen where the window's center is located is returned. See also [method window_set_current_screen].
</description>
</method>
<method name="window_get_flag" qualifiers="const">
@@ -1071,12 +1119,14 @@
<return type="Vector2i" />
<param index="0" name="window_id" type="int" default="0" />
<description>
+ Returns the window's maximum size (in pixels). See also [method window_set_max_size].
</description>
</method>
<method name="window_get_min_size" qualifiers="const">
<return type="Vector2i" />
<param index="0" name="window_id" type="int" default="0" />
<description>
+ Returns the window's minimum size (in pixels). See also [method window_set_min_size].
</description>
</method>
<method name="window_get_mode" qualifiers="const">
@@ -1092,7 +1142,7 @@
<param index="1" name="window_id" type="int" default="0" />
<description>
Returns internal structure pointers for use in plugins.
- [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows.
+ [b]Note:[/b] This method is implemented on Android, Linux (X11), macOS and Windows.
</description>
</method>
<method name="window_get_popup_safe_rect" qualifiers="const">
@@ -1113,19 +1163,21 @@
<return type="Vector2i" />
<param index="0" name="window_id" type="int" default="0" />
<description>
+ Returns the size of the window specified by [param window_id] (in pixels), including the borders drawn by the operating system. See also [method window_get_size].
</description>
</method>
<method name="window_get_safe_title_margins" qualifiers="const">
- <return type="Vector2i" />
+ <return type="Vector3i" />
<param index="0" name="window_id" type="int" default="0" />
<description>
- Returns left and right margins of the title that are safe to use (contains no buttons or other elements) when [constant WINDOW_FLAG_EXTEND_TO_TITLE] flag is set.
+ Returns left margins ([code]x[/code]), right margins ([code]y[/code]) and height ([code]z[/code]) of the title that are safe to use (contains no buttons or other elements) when [constant WINDOW_FLAG_EXTEND_TO_TITLE] flag is set.
</description>
</method>
<method name="window_get_size" qualifiers="const">
<return type="Vector2i" />
<param index="0" name="window_id" type="int" default="0" />
<description>
+ Returns the size of the window specified by [param window_id] (in pixels), excluding the borders drawn by the operating system. This is also called the "client area". See also [method window_get_real_size], [method window_set_size] and [method window_get_position].
</description>
</method>
<method name="window_get_vsync_mode" qualifiers="const">
@@ -1135,6 +1187,13 @@
Returns the V-Sync mode of the given window.
</description>
</method>
+ <method name="window_is_maximize_allowed" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="window_id" type="int" default="0" />
+ <description>
+ Returns [code]true[/code] if the given window can be maximized (the maximize button is enabled).
+ </description>
+ </method>
<method name="window_maximize_on_title_dbl_click" qualifiers="const">
<return type="bool" />
<description>
@@ -1153,12 +1212,14 @@
<return type="void" />
<param index="0" name="window_id" type="int" default="0" />
<description>
+ Moves the window specified by [param window_id] to the foreground, so that it is visible over other windows.
</description>
</method>
<method name="window_request_attention">
<return type="void" />
<param index="0" name="window_id" type="int" default="0" />
<description>
+ Makes the window specified by [param window_id] request attention, which is materialized by the window title and taskbar entry blinking until the window is focused. This usually has no visible effect if the window is currently focused. The exact behavior varies depending on the operating system.
</description>
</method>
<method name="window_set_current_screen">
@@ -1166,6 +1227,7 @@
<param index="0" name="screen" type="int" />
<param index="1" name="window_id" type="int" default="0" />
<description>
+ Moves the window specified by [param window_id] to the specified [param screen]. See also [method window_get_current_screen].
</description>
</method>
<method name="window_set_drop_files_callback">
@@ -1173,6 +1235,8 @@
<param index="0" name="callback" type="Callable" />
<param index="1" name="window_id" type="int" default="0" />
<description>
+ Sets the [param callback] that should be called when files are dropped from the operating system's file manager to the window specified by [param window_id].
+ [b]Note:[/b] This method is implemented on Windows, macOS, Linux (X11) and Web.
</description>
</method>
<method name="window_set_exclusive">
@@ -1199,6 +1263,7 @@
<param index="0" name="active" type="bool" />
<param index="1" name="window_id" type="int" default="0" />
<description>
+ Sets whether [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] should be enabled for the window specified by [param window_id]. See also [method window_set_ime_position].
</description>
</method>
<method name="window_set_ime_position">
@@ -1206,6 +1271,7 @@
<param index="0" name="position" type="Vector2i" />
<param index="1" name="window_id" type="int" default="0" />
<description>
+ Sets the position of the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] popup for the specified [param window_id]. Only effective if [method window_set_ime_active] was set to [code]true[/code] for the specified [param window_id].
</description>
</method>
<method name="window_set_input_event_callback">
@@ -1213,6 +1279,7 @@
<param index="0" name="callback" type="Callable" />
<param index="1" name="window_id" type="int" default="0" />
<description>
+ Sets the [param callback] that should be called when any [InputEvent] is sent to the window specified by [param window_id].
</description>
</method>
<method name="window_set_input_text_callback">
@@ -1220,6 +1287,7 @@
<param index="0" name="callback" type="Callable" />
<param index="1" name="window_id" type="int" default="0" />
<description>
+ Sets the [param callback] that should be called when text is entered using the virtual keyboard to the window specified by [param window_id].
</description>
</method>
<method name="window_set_max_size">
@@ -1227,6 +1295,8 @@
<param index="0" name="max_size" type="Vector2i" />
<param index="1" name="window_id" type="int" default="0" />
<description>
+ Sets the maximum size of the window specified by [param window_id] in pixels. Normally, the user will not be able to drag the window to make it smaller than the specified size. See also [method window_get_max_size].
+ [b]Note:[/b] Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit.
</description>
</method>
<method name="window_set_min_size">
@@ -1234,8 +1304,9 @@
<param index="0" name="min_size" type="Vector2i" />
<param index="1" name="window_id" type="int" default="0" />
<description>
- Sets the minimum size for the given window to [param min_size] (in pixels).
+ Sets the minimum size for the given window to [param min_size] (in pixels). Normally, the user will not be able to drag the window to make it larger than the specified size. See also [method window_get_min_size].
[b]Note:[/b] By default, the main window has a minimum size of [code]Vector2i(64, 64)[/code]. This prevents issues that can arise when the window is resized to a near-zero size.
+ [b]Note:[/b] Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit.
</description>
</method>
<method name="window_set_mode">
@@ -1276,8 +1347,8 @@
DisplayServer.WindowSetMousePassthrough(new Vector2[] {});
[/csharp]
[/codeblocks]
- [b]Note:[/b] On Windows, the portion of a window that lies outside the region is not drawn, while on Linux and macOS it is.
- [b]Note:[/b] This method is implemented on Linux, macOS and Windows.
+ [b]Note:[/b] On Windows, the portion of a window that lies outside the region is not drawn, while on Linux (X11) and macOS it is.
+ [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows.
</description>
</method>
<method name="window_set_popup_safe_rect">
@@ -1293,7 +1364,16 @@
<param index="0" name="position" type="Vector2i" />
<param index="1" name="window_id" type="int" default="0" />
<description>
- Sets the position of the given window to [param position].
+ Sets the position of the given window to [param position]. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this:
+ [codeblock]
+ * (0, 0) +-------+
+ | |
+ +-------------+ | |
+ | | | |
+ | | | |
+ +-------------+ +-------+
+ [/codeblock]
+ See also [method window_get_position] and [method window_set_size].
</description>
</method>
<method name="window_set_rect_changed_callback">
@@ -1301,6 +1381,7 @@
<param index="0" name="callback" type="Callable" />
<param index="1" name="window_id" type="int" default="0" />
<description>
+ Sets the [param callback] that will be called when the window specified by [param window_id] is moved or resized.
</description>
</method>
<method name="window_set_size">
@@ -1308,7 +1389,7 @@
<param index="0" name="size" type="Vector2i" />
<param index="1" name="window_id" type="int" default="0" />
<description>
- Sets the size of the given window to [param size].
+ Sets the size of the given window to [param size] (in pixels). See also [method window_get_size] and [method window_get_position].
</description>
</method>
<method name="window_set_title">
@@ -1317,6 +1398,7 @@
<param index="1" name="window_id" type="int" default="0" />
<description>
Sets the title of the given window to [param title].
+ [b]Note:[/b] Avoid changing the window title every frame, as this can cause performance issues on certain window managers. Try to change the window title only a few times per second at most.
</description>
</method>
<method name="window_set_transient">
@@ -1352,51 +1434,70 @@
<param index="0" name="callback" type="Callable" />
<param index="1" name="window_id" type="int" default="0" />
<description>
+ Sets the [param callback] that will be called when an event occurs in the window specified by [param window_id].
</description>
</method>
</methods>
<constants>
<constant name="FEATURE_GLOBAL_MENU" value="0" enum="Feature">
+ Display server supports global menu. This allows the application to display its menu items in the operating system's top bar. [b]macOS[/b]
</constant>
<constant name="FEATURE_SUBWINDOWS" value="1" enum="Feature">
+ Display server supports multiple windows that can be moved outside of the main window. [b]Windows, macOS, Linux (X11)[/b]
</constant>
<constant name="FEATURE_TOUCHSCREEN" value="2" enum="Feature">
+ Display server supports touchscreen input. [b]Windows, Linux (X11), Android, iOS, Web[/b]
</constant>
<constant name="FEATURE_MOUSE" value="3" enum="Feature">
+ Display server supports mouse input. [b]Windows, macOS, Linux (X11), Android, Web[/b]
</constant>
<constant name="FEATURE_MOUSE_WARP" value="4" enum="Feature">
+ Display server supports warping mouse coordinates to keep the mouse cursor constrained within an area, but looping when one of the edges is reached. [b]Windows, macOS, Linux (X11)[/b]
</constant>
<constant name="FEATURE_CLIPBOARD" value="5" enum="Feature">
+ Display server supports setting and getting clipboard data. See also [constant FEATURE_CLIPBOARD_PRIMARY]. [b]Windows, macOS, Linux (X11), Android, iOS, Web[/b]
</constant>
<constant name="FEATURE_VIRTUAL_KEYBOARD" value="6" enum="Feature">
+ Display server supports popping up a virtual keyboard when requested to input text without a physical keyboard. [b]Android, iOS, Web[/b]
</constant>
<constant name="FEATURE_CURSOR_SHAPE" value="7" enum="Feature">
+ Display server supports setting the mouse cursor shape to be different from the default. [b]Windows, macOS, Linux (X11), Android, Web[/b]
</constant>
<constant name="FEATURE_CUSTOM_CURSOR_SHAPE" value="8" enum="Feature">
+ Display server supports setting the mouse cursor shape to a custom image. [b]Windows, macOS, Linux (X11), Web[/b]
</constant>
<constant name="FEATURE_NATIVE_DIALOG" value="9" enum="Feature">
+ Display server supports spawning dialogs using the operating system's native look-and-feel. [b]macOS[/b]
</constant>
<constant name="FEATURE_IME" value="10" enum="Feature">
+ Display server supports [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url], which is commonly used for inputting Chinese/Japanese/Korean text. This is handled by the operating system, rather than by Godot. [b]Windows, macOS, Linux (X11)[/b]
</constant>
<constant name="FEATURE_WINDOW_TRANSPARENCY" value="11" enum="Feature">
+ Display server supports windows can use per-pixel transparency to make windows behind them partially or fully visible. [b]Windows, macOS, Linux (X11)[/b]
</constant>
<constant name="FEATURE_HIDPI" value="12" enum="Feature">
+ Display server supports querying the operating system's display scale factor. This allows for [i]reliable[/i] automatic hiDPI display detection, as opposed to guessing based on the screen resolution and reported display DPI (which can be unreliable due to broken monitor EDID). [b]Windows, macOS[/b]
</constant>
<constant name="FEATURE_ICON" value="13" enum="Feature">
+ Display server supports changing the window icon (usually displayed in the top-left corner). [b]Windows, macOS, Linux (X11)[/b]
</constant>
<constant name="FEATURE_NATIVE_ICON" value="14" enum="Feature">
+ Display server supports changing the window icon (usually displayed in the top-left corner). [b]Windows, macOS[/b]
</constant>
<constant name="FEATURE_ORIENTATION" value="15" enum="Feature">
+ Display server supports changing the screen orientation. [b]Android, iOS[/b]
</constant>
<constant name="FEATURE_SWAP_BUFFERS" value="16" enum="Feature">
+ Display server supports V-Sync status can be changed from the default (which is forced to be enabled platforms not supporting this feature). [b]Windows, macOS, Linux (X11)[/b]
</constant>
<constant name="FEATURE_CLIPBOARD_PRIMARY" value="18" enum="Feature">
+ Display server supports Primary clipboard can be used. This is a different clipboard from [constant FEATURE_CLIPBOARD]. [b]Linux (X11)[/b]
</constant>
<constant name="FEATURE_TEXT_TO_SPEECH" value="19" enum="Feature">
- Display server supports text-to-speech. See [code]tts_*[/code] methods.
+ Display server supports text-to-speech. See [code]tts_*[/code] methods. [b]Windows, macOS, Linux (X11), Android, iOS, Web[/b]
</constant>
<constant name="FEATURE_EXTEND_TO_TITLE" value="20" enum="Feature">
- Display server supports expanding window content to the title. See [constant WINDOW_FLAG_EXTEND_TO_TITLE].
+ Display server supports expanding window content to the title. See [constant WINDOW_FLAG_EXTEND_TO_TITLE]. [b]macOS[/b]
</constant>
<constant name="MOUSE_MODE_VISIBLE" value="0" enum="MouseMode">
Makes the mouse cursor visible if it is hidden.
@@ -1415,24 +1516,34 @@
Confines the mouse cursor to the game window, and make it hidden.
</constant>
<constant name="SCREEN_OF_MAIN_WINDOW" value="-1">
+ Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens.
</constant>
<constant name="MAIN_WINDOW_ID" value="0">
+ The ID of the main window spawned by the engine, which can be passed to methods expecting a [code]window_id[/code].
</constant>
<constant name="INVALID_WINDOW_ID" value="-1">
+ The ID that refers to a nonexisting window. This is be returned by some [DisplayServer] methods if no window matches the requested result.
</constant>
<constant name="SCREEN_LANDSCAPE" value="0" enum="ScreenOrientation">
+ Default landscape orientation.
</constant>
<constant name="SCREEN_PORTRAIT" value="1" enum="ScreenOrientation">
+ Default portrait orienstation.
</constant>
<constant name="SCREEN_REVERSE_LANDSCAPE" value="2" enum="ScreenOrientation">
+ Reverse landscape orientation (upside down).
</constant>
<constant name="SCREEN_REVERSE_PORTRAIT" value="3" enum="ScreenOrientation">
+ Reverse portrait orientation (upside down).
</constant>
<constant name="SCREEN_SENSOR_LANDSCAPE" value="4" enum="ScreenOrientation">
+ Automatic landscape orientation (default or reverse depending on sensor).
</constant>
<constant name="SCREEN_SENSOR_PORTRAIT" value="5" enum="ScreenOrientation">
+ Automatic portrait orientation (default or reverse depending on sensor).
</constant>
<constant name="SCREEN_SENSOR" value="6" enum="ScreenOrientation">
+ Automatic landscape or portrait orientation (default or reverse depending on sensor).
</constant>
<constant name="KEYBOARD_TYPE_DEFAULT" value="0" enum="VirtualKeyboardType">
Default text virtual keyboard.
@@ -1460,40 +1571,58 @@
Virtual keyboard with additional keys to assist with typing URLs.
</constant>
<constant name="CURSOR_ARROW" value="0" enum="CursorShape">
+ Arrow cursor shape. This is the default when not pointing anything that overrides the mouse cursor, such as a [LineEdit] or [TextEdit].
</constant>
<constant name="CURSOR_IBEAM" value="1" enum="CursorShape">
+ I-beam cursor shape. This is used by default when hovering a control that accepts text input, such as [LineEdit] or [TextEdit].
</constant>
<constant name="CURSOR_POINTING_HAND" value="2" enum="CursorShape">
+ Pointing hand cursor shape. This is used by default when hovering a [LinkButton] or an URL tag in a [RichTextLabel].â‹…
</constant>
<constant name="CURSOR_CROSS" value="3" enum="CursorShape">
+ Crosshair cursor. This is intended to be displayed when the user needs precise aim over an element, such as a rectangle selection tool or a color picker.
</constant>
<constant name="CURSOR_WAIT" value="4" enum="CursorShape">
+ Wait cursor. On most cursor themes, this displays a spinning icon [i]besides[/i] the arrow. Intended to be used for non-blocking operations (when the user can do something else at the moment). See also [constant CURSOR_BUSY].
</constant>
<constant name="CURSOR_BUSY" value="5" enum="CursorShape">
+ Wait cursor. On most cursor themes, this [i]replaces[/i] the arrow with a spinning icon. Intended to be used for blocking operations (when the user can't do anything else at the moment). See also [constant CURSOR_WAIT].
</constant>
<constant name="CURSOR_DRAG" value="6" enum="CursorShape">
+ Dragging hand cursor. This is displayed during drag-and-drop operations. See also [constant CURSOR_CAN_DROP].
</constant>
<constant name="CURSOR_CAN_DROP" value="7" enum="CursorShape">
+ "Can drop" cursor. This is displayed during drag-and-drop operations if hovering over a [Control] that can accept the drag-and-drop event. On most cursor themes, this displays a dragging hand with an arrow symbol besides it. See also [constant CURSOR_DRAG].
</constant>
<constant name="CURSOR_FORBIDDEN" value="8" enum="CursorShape">
+ Forbidden cursor. This is displayed during drag-and-drop operations if the hovered [Control] can't accept the drag-and-drop event.
</constant>
<constant name="CURSOR_VSIZE" value="9" enum="CursorShape">
+ Vertical resize cursor. Intended to be displayed when the hovered [Control] can be vertically resized using the mouse. See also [constant CURSOR_VSPLIT].
</constant>
<constant name="CURSOR_HSIZE" value="10" enum="CursorShape">
+ Horizontal resize cursor. Intended to be displayed when the hovered [Control] can be horizontally resized using the mouse. See also [constant CURSOR_HSPLIT].
</constant>
<constant name="CURSOR_BDIAGSIZE" value="11" enum="CursorShape">
+ Secondary diagonal resize cursor (top-right/bottom-left). Intended to be displayed when the hovered [Control] can be resized on both axes at once using the mouse.
</constant>
<constant name="CURSOR_FDIAGSIZE" value="12" enum="CursorShape">
+ Main diagonal resize cursor (top-left/bottom-right). Intended to be displayed when the hovered [Control] can be resized on both axes at once using the mouse.
</constant>
<constant name="CURSOR_MOVE" value="13" enum="CursorShape">
+ Move cursor. Intended to be displayed when the hovered [Control] can be moved using the mouse.
</constant>
<constant name="CURSOR_VSPLIT" value="14" enum="CursorShape">
+ Vertical split cursor. This is displayed when hovering a [Control] with splits that can be vertically resized using the mouse, such as [VSplitContainer]. On some cursor themes, this cursor may have the same appearance as [constant CURSOR_VSIZE].
</constant>
<constant name="CURSOR_HSPLIT" value="15" enum="CursorShape">
+ Horizontal split cursor. This is displayed when hovering a [Control] with splits that can be horizontally resized using the mouse, such as [HSplitContainer]. On some cursor themes, this cursor may have the same appearance as [constant CURSOR_HSIZE].
</constant>
<constant name="CURSOR_HELP" value="16" enum="CursorShape">
+ Help cursor. On most cursor themes, this displays a question mark icon instead of the mouse cursor. Intended to be used when the user has requested help on the next element that will be clicked.
</constant>
<constant name="CURSOR_MAX" value="17" enum="CursorShape">
+ Represents the size of the [enum CursorShape] enum.
</constant>
<constant name="WINDOW_MODE_WINDOWED" value="0" enum="WindowMode">
Windowed mode, i.e. [Window] doesn't occupy the whole screen (unless set to the size of the screen).
@@ -1505,12 +1634,13 @@
Maximized window mode, i.e. [Window] will occupy whole screen area except task bar and still display its borders. Normally happens when the minimize button is pressed.
</constant>
<constant name="WINDOW_MODE_FULLSCREEN" value="3" enum="WindowMode">
- Full screen window mode. Note that this is not [i]exclusive[/i] full screen. On Windows and Linux, a borderless window is used to emulate full screen. On macOS, a new desktop is used to display the running project.
+ Full screen window mode. Note that this is not [i]exclusive[/i] full screen. On Windows and Linux (X11), a borderless window is used to emulate full screen. On macOS, a new desktop is used to display the running project.
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">
@@ -1525,7 +1655,7 @@
<constant name="WINDOW_FLAG_TRANSPARENT" value="3" enum="WindowFlags">
The window background can be transparent.
[b]Note:[/b] This flag has no effect if [member ProjectSettings.display/window/per_pixel_transparency/allowed] is set to [code]false[/code].
- [b]Note:[/b] Transparency support is implemented on Linux, macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities.
+ [b]Note:[/b] Transparency support is implemented on Linux (X11), macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities.
</constant>
<constant name="WINDOW_FLAG_NO_FOCUS" value="4" enum="WindowFlags">
The window can't be focused. No-focus window will ignore all input, except mouse clicks.
@@ -1570,35 +1700,43 @@
[b]Note:[/b] This flag is implemented on macOS.
</constant>
<constant name="VSYNC_DISABLED" value="0" enum="VSyncMode">
- No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible).
+ No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible). Framerate is unlimited (nonwithstanding [member Engine.max_fps]).
</constant>
<constant name="VSYNC_ENABLED" value="1" enum="VSyncMode">
- Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible).
+ Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible). Framerate is limited by the monitor refresh rate (nonwithstanding [member Engine.max_fps]).
</constant>
<constant name="VSYNC_ADAPTIVE" value="2" enum="VSyncMode">
- Behaves like [constant VSYNC_DISABLED] when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible), otherwise vertical synchronization is enabled to avoid tearing.
+ Behaves like [constant VSYNC_DISABLED] when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible). Otherwise, vertical synchronization is enabled to avoid tearing. Framerate is limited by the monitor refresh rate (nonwithstanding [member Engine.max_fps]).
</constant>
<constant name="VSYNC_MAILBOX" value="3" enum="VSyncMode">
- Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible).
- Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag.
+ Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible). Framerate is unlimited (nonwithstanding [member Engine.max_fps]).
+ Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag (also called "Fast" V-Sync mode). [constant VSYNC_MAILBOX] works best when at least twice as many frames as the display refresh rate are rendered.
</constant>
<constant name="DISPLAY_HANDLE" value="0" enum="HandleType">
Display handle:
- - Linux: [code]X11::Display*[/code] for the display.
+ - Linux (X11): [code]X11::Display*[/code] for the display.
</constant>
<constant name="WINDOW_HANDLE" value="1" enum="HandleType">
Window handle:
- Windows: [code]HWND[/code] for the window.
- - Linux: [code]X11::Window*[/code] for the window.
+ - Linux (X11): [code]X11::Window*[/code] for the window.
- macOS: [code]NSWindow*[/code] for the window.
- iOS: [code]UIViewController*[/code] for the view controller.
- Android: [code]jObject[/code] for the activity.
</constant>
<constant name="WINDOW_VIEW" value="2" enum="HandleType">
Window view:
+ - Windows: [code]HDC[/code] for the window (only with the GL Compatibility renderer).
- macOS: [code]NSView*[/code] for the window main view.
- iOS: [code]UIView*[/code] for the window main view.
</constant>
+ <constant name="OPENGL_CONTEXT" value="3" enum="HandleType">
+ OpenGL context (only with the GL Compatibility renderer):
+ - Windows: [code]HGLRC[/code] for the window.
+ - Linux: [code]GLXContext*[/code] for the window.
+ - MacOS: [code]NSOpenGLContext*[/code] for the window.
+ - Android: [code]EGLContext[/code] for the window.
+ </constant>
<constant name="TTS_UTTERANCE_STARTED" value="0" enum="TTSUtteranceEvent">
Utterance has begun to be spoken.
</constant>
diff --git a/doc/classes/EditorCommandPalette.xml b/doc/classes/EditorCommandPalette.xml
index 53a3fe5d19..380c79fc1a 100644
--- a/doc/classes/EditorCommandPalette.xml
+++ b/doc/classes/EditorCommandPalette.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Object that holds all the available Commands and their shortcuts text. These Commands can be accessed through [b]Editor &gt; Command Palette[/b] menu.
- Command key names use slash delimiters to distinguish sections Example: [code]"example/command1"[/code] then [code]example[/code] will be the section name.
+ Command key names use slash delimiters to distinguish sections, for example: [code]"example/command1"[/code] then [code]example[/code] will be the section name.
[codeblocks]
[gdscript]
var command_palette = get_editor_interface().get_command_palette()
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/EditorFeatureProfile.xml b/doc/classes/EditorFeatureProfile.xml
index e216059364..27f61f1bd8 100644
--- a/doc/classes/EditorFeatureProfile.xml
+++ b/doc/classes/EditorFeatureProfile.xml
@@ -28,7 +28,7 @@
<return type="bool" />
<param index="0" name="class_name" type="StringName" />
<description>
- Returns [code]true[/code] if editing for the class specified by [param class_name] is disabled. When disabled, the class will still appear in the Create New Node dialog but the inspector will be read-only when selecting a node that extends the class.
+ Returns [code]true[/code] if editing for the class specified by [param class_name] is disabled. When disabled, the class will still appear in the Create New Node dialog but the Inspector will be read-only when selecting a node that extends the class.
</description>
</method>
<method name="is_class_property_disabled" qualifiers="const">
@@ -36,7 +36,7 @@
<param index="0" name="class_name" type="StringName" />
<param index="1" name="property" type="StringName" />
<description>
- Returns [code]true[/code] if [param property] is disabled in the class specified by [param class_name]. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by [param class_name].
+ Returns [code]true[/code] if [param property] is disabled in the class specified by [param class_name]. When a property is disabled, it won't appear in the Inspector when selecting a node that extends the class specified by [param class_name].
</description>
</method>
<method name="is_feature_disabled" qualifiers="const">
@@ -73,7 +73,7 @@
<param index="0" name="class_name" type="StringName" />
<param index="1" name="disable" type="bool" />
<description>
- If [param disable] is [code]true[/code], disables editing for the class specified by [param class_name]. When disabled, the class will still appear in the Create New Node dialog but the inspector will be read-only when selecting a node that extends the class.
+ If [param disable] is [code]true[/code], disables editing for the class specified by [param class_name]. When disabled, the class will still appear in the Create New Node dialog but the Inspector will be read-only when selecting a node that extends the class.
</description>
</method>
<method name="set_disable_class_property">
@@ -82,7 +82,7 @@
<param index="1" name="property" type="StringName" />
<param index="2" name="disable" type="bool" />
<description>
- If [param disable] is [code]true[/code], disables editing for [param property] in the class specified by [param class_name]. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by [param class_name].
+ If [param disable] is [code]true[/code], disables editing for [param property] in the class specified by [param class_name]. When a property is disabled, it won't appear in the Inspector when selecting a node that extends the class specified by [param class_name].
</description>
</method>
<method name="set_disable_feature">
@@ -116,7 +116,10 @@
<constant name="FEATURE_IMPORT_DOCK" value="6" enum="Feature">
The Import dock. If this feature is disabled, the Import dock won't be visible.
</constant>
- <constant name="FEATURE_MAX" value="7" enum="Feature">
+ <constant name="FEATURE_HISTORY_DOCK" value="7" enum="Feature">
+ The History dock. If this feature is disabled, the History dock won't be visible.
+ </constant>
+ <constant name="FEATURE_MAX" value="8" enum="Feature">
Represents the size of the [enum Feature] enum.
</constant>
</constants>
diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml
index 891c8d7d92..29a8f470a1 100644
--- a/doc/classes/EditorFileDialog.xml
+++ b/doc/classes/EditorFileDialog.xml
@@ -4,6 +4,7 @@
A modified version of [FileDialog] used by the editor.
</brief_description>
<description>
+ [EditorFileDialog] is an enhanced version of [FileDialog] available only to editor plugins. Additional features include list of favorited/recent files and ability to see files as thumbnails grid instead of list.
</description>
<tutorials>
</tutorials>
@@ -62,7 +63,7 @@
The dialog's open or save mode, which affects the selection behavior. See [enum FileMode]
</member>
<member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files" default="false">
- If [code]true[/code], hidden files and directories will be visible in the [EditorFileDialog].
+ If [code]true[/code], hidden files and directories will be visible in the [EditorFileDialog]. This property is synchronized with [member EditorSettings.filesystem/file_dialog/show_hidden_files].
</member>
<member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default="&quot;Save a File&quot;" />
</members>
diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml
index a1a43dd5bf..0cda49f1bf 100644
--- a/doc/classes/EditorInspector.xml
+++ b/doc/classes/EditorInspector.xml
@@ -7,8 +7,8 @@
This is the control that implements property editing in the editor's Settings dialogs, the Inspector dock, etc. To get the [EditorInspector] used in the editor's Inspector dock, use [method EditorInterface.get_inspector].
[EditorInspector] will show properties in the same order as the array returned by [method Object.get_property_list].
If a property's name is path-like (i.e. if it contains forward slashes), [EditorInspector] will create nested sections for "directories" along the path. For example, if a property is named [code]highlighting/gdscript/node_path_color[/code], it will be shown as "Node Path Color" inside the "GDScript" section nested inside the "Highlighting" section.
- If a property has [constant @GlobalScope.PROPERTY_USAGE_GROUP] usage, it will group subsequent properties whose name starts with the property's hint string. The group ends when a property does not start with that hint string or when a new group starts. An empty group name effectively ends the current group. [EditorInspector] will create a top-level section for each group. For example, if a property with group usage is named [code]Collide With[/code] and its hint string is [code]collide_with_[/code], a subsequent [code]collide_with_area[/code] property will be shown as "Area" inside the "Collide With" section.
- If a property has [constant @GlobalScope.PROPERTY_USAGE_SUBGROUP] usage, a subgroup will be created in the same way as a group, and a second-level section will be created for each subgroup.
+ If a property has [constant PROPERTY_USAGE_GROUP] usage, it will group subsequent properties whose name starts with the property's hint string. The group ends when a property does not start with that hint string or when a new group starts. An empty group name effectively ends the current group. [EditorInspector] will create a top-level section for each group. For example, if a property with group usage is named [code]Collide With[/code] and its hint string is [code]collide_with_[/code], a subsequent [code]collide_with_area[/code] property will be shown as "Area" inside the "Collide With" section.
+ If a property has [constant PROPERTY_USAGE_SUBGROUP] usage, a subgroup will be created in the same way as a group, and a second-level section will be created for each subgroup.
[b]Note:[/b] Unlike sections created from path-like property names, [EditorInspector] won't capitalize the name for sections created from groups. So properties with group usage usually use capitalized names instead of snake_cased names.
</description>
<tutorials>
@@ -33,7 +33,7 @@
<signal name="object_id_selected">
<param index="0" name="id" type="int" />
<description>
- Emitted when the Edit button of an [Object] has been pressed in the inspector. This is mainly used in the remote scene tree inspector.
+ Emitted when the Edit button of an [Object] has been pressed in the inspector. This is mainly used in the remote scene tree Inspector.
</description>
</signal>
<signal name="property_deleted">
diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml
index c8a499260e..ba2f7b24bf 100644
--- a/doc/classes/EditorInspectorPlugin.xml
+++ b/doc/classes/EditorInspectorPlugin.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="EditorInspectorPlugin" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Plugin for adding custom property editors on inspector.
+ Plugin for adding custom property editors on the inspector.
</brief_description>
<description>
[EditorInspectorPlugin] allows adding custom property editors to [EditorInspector].
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
index 1e3b1f07ee..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>
@@ -70,6 +76,7 @@
<method name="get_editor_paths">
<return type="EditorPaths" />
<description>
+ Returns the [EditorPaths] singleton.
</description>
</method>
<method name="get_editor_scale" qualifiers="const">
@@ -130,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">
@@ -151,6 +158,12 @@
Shows the given property on the given [param object] in the editor's Inspector dock. If [param inspector_only] is [code]true[/code], plugins will not attempt to edit [param object].
</description>
</method>
+ <method name="is_movie_maker_enabled" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if Movie Maker mode is enabled in the editor. See also [method set_movie_maker_enabled]. See [MovieWriter] for more information.
+ </description>
+ </method>
<method name="is_playing_scene" qualifiers="const">
<return type="bool" />
<description>
@@ -215,7 +228,7 @@
<method name="save_scene">
<return type="int" enum="Error" />
<description>
- Saves the scene. Returns either [code]OK[/code] or [code]ERR_CANT_CREATE[/code] (see [@GlobalScope] constants).
+ Saves the scene. Returns either [constant OK] or [constant ERR_CANT_CREATE].
</description>
</method>
<method name="save_scene_as">
@@ -240,6 +253,13 @@
Sets the editor's current main screen to the one specified in [param name]. [param name] must match the text of the tab in question exactly ([code]2D[/code], [code]3D[/code], [code]Script[/code], [code]AssetLib[/code]).
</description>
</method>
+ <method name="set_movie_maker_enabled">
+ <return type="void" />
+ <param index="0" name="enabled" type="bool" />
+ <description>
+ Sets whether Movie Maker mode is enabled in the editor. See also [method is_movie_maker_enabled]. See [MovieWriter] for more information.
+ </description>
+ </method>
<method name="set_plugin_enabled">
<return type="void" />
<param index="0" name="plugin" type="String" />
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 563987e2a3..806588d100 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -100,7 +100,8 @@
<param index="0" name="viewport_camera" type="Camera3D" />
<param index="1" name="event" type="InputEvent" />
<description>
- Called when there is a root node in the current edited scene, [method _handles] is implemented, and an [InputEvent] happens in the 3D viewport. The return value decides whether the [InputEvent] is consumed or forwarded to other [EditorPlugin]s. See [enum AfterGUIInput] for options. Example:
+ Called when there is a root node in the current edited scene, [method _handles] is implemented, and an [InputEvent] happens in the 3D viewport. The return value decides whether the [InputEvent] is consumed or forwarded to other [EditorPlugin]s. See [enum AfterGUIInput] for options.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
# Prevents the InputEvent from reaching other Editor classes.
@@ -115,7 +116,8 @@
}
[/csharp]
[/codeblocks]
- Must [code]return EditorPlugin.AFTER_GUI_INPUT_PASS[/code] in order to forward the [InputEvent] to other Editor classes. Example:
+ Must [code]return EditorPlugin.AFTER_GUI_INPUT_PASS[/code] in order to forward the [InputEvent] to other Editor classes.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
# Consumes InputEventMouseMotion and forwards other InputEvent types.
@@ -182,7 +184,8 @@
<return type="bool" />
<param index="0" name="event" type="InputEvent" />
<description>
- Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [param event], otherwise forwards [param event] to other Editor classes. Example:
+ Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [param event], otherwise forwards [param event] to other Editor classes.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
# Prevents the InputEvent from reaching other Editor classes.
@@ -197,7 +200,8 @@
}
[/csharp]
[/codeblocks]
- Must [code]return false[/code] in order to forward the [InputEvent] to other Editor classes. Example:
+ Must [code]return false[/code] in order to forward the [InputEvent] to other Editor classes.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
# Consumes InputEventMouseMotion and forwards other InputEvent types.
@@ -411,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>
@@ -595,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>
@@ -691,11 +695,13 @@
</signal>
<signal name="project_settings_changed">
<description>
+ Emitted when any project setting has changed.
</description>
</signal>
<signal name="resource_saved">
<param index="0" name="resource" type="Resource" />
<description>
+ Emitted when the given [param resource] was saved on disc.
</description>
</signal>
<signal name="scene_changed">
diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml
index 9170c449bf..2aca19510b 100644
--- a/doc/classes/EditorProperty.xml
+++ b/doc/classes/EditorProperty.xml
@@ -61,6 +61,7 @@
<method name="update_property">
<return type="void" />
<description>
+ Forces refresh of the property display.
</description>
</method>
</methods>
diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml
index dfc04c9cde..a02fd215d8 100644
--- a/doc/classes/EditorScript.xml
+++ b/doc/classes/EditorScript.xml
@@ -30,6 +30,7 @@
[/csharp]
[/codeblocks]
[b]Note:[/b] The script is run in the Editor context, which means the output is visible in the console window started with the Editor (stdout) instead of the usual Godot [b]Output[/b] dock.
+ [b]Note:[/b] EditorScript is [RefCounted], meaning it is destroyed when nothing references it. This can cause errors during asynchronous operations if there are no references to the script.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml
index 7f3ffce9b7..07457387a0 100644
--- a/doc/classes/EditorSettings.xml
+++ b/doc/classes/EditorSettings.xml
@@ -196,10 +196,10 @@
The thumbnail size to use in the FileSystem dock (in pixels). See also [member filesystem/file_dialog/thumbnail_size].
</member>
<member name="docks/property_editor/auto_refresh_interval" type="float" setter="" getter="">
- The refresh interval to use for the inspector dock's properties. The effect of this setting is mainly noticeable when adjusting gizmos in the 2D/3D editor and looking at the inspector at the same time. Lower values make the inspector more often, but take up more CPU time.
+ The refresh interval to use for the Inspector dock's properties. The effect of this setting is mainly noticeable when adjusting gizmos in the 2D/3D editor and looking at the inspector at the same time. Lower values make the inspector more often, but take up more CPU time.
</member>
<member name="docks/property_editor/subresource_hue_tint" type="float" setter="" getter="">
- The tint intensity to use for the subresources background in the inspector dock. The tint is used to distinguish between different subresources in the inspector. Higher values result in a more noticeable background color difference.
+ The tint intensity to use for the subresources background in the Inspector dock. The tint is used to distinguish between different subresources in the inspector. Higher values result in a more noticeable background color difference.
</member>
<member name="docks/scene_tree/auto_expand_to_selected" type="bool" setter="" getter="">
If [code]true[/code], the scene tree dock will automatically unfold nodes when a node that has folded parents is selected.
@@ -363,7 +363,7 @@
The color to use for the selection box that surrounds selected nodes in the 3D editor viewport. The color's alpha channel influences the selection box's opacity.
</member>
<member name="editors/3d_gizmos/gizmo_colors/instantiated" type="Color" setter="" getter="">
- The color override to use for 3D editor gizmos if the [Node3D] in question is part of an instanced scene file (from the perspective of the current scene).
+ The color override to use for 3D editor gizmos if the [Node3D] in question is part of an instantiated scene file (from the perspective of the current scene).
</member>
<member name="editors/3d_gizmos/gizmo_colors/joint" type="Color" setter="" getter="">
The 3D editor gizmo color for [Joint3D]s and [PhysicalBone3D]s.
@@ -457,6 +457,12 @@
If [code]true[/code], when saving a file, the editor will rename the old file to a different name, save a new file, then only remove the old file once the new file has been saved. This makes loss of data less likely to happen if the editor or operating system exits unexpectedly while saving (e.g. due to a crash or power outage).
[b]Note:[/b] On Windows, this feature can interact negatively with certain antivirus programs. In this case, you may have to set this to [code]false[/code] to prevent file locking issues.
</member>
+ <member name="interface/editor/accept_dialog_cancel_ok_buttons" type="int" setter="" getter="">
+ How to position the Cancel and OK buttons in the editor's [AcceptDialog]s. Different platforms have different standard behaviors for this, which can be overridden using this setting. This is useful if you use Godot both on Windows and macOS/Linux and your Godot muscle memory is stronger than your OS specific one.
+ - [b]Auto[/b] follows the platform convention: Cancel first on macOS and Linux, OK first on Windows.
+ - [b]Cancel First[/b] forces the ordering Cancel/OK.
+ - [b]OK First[/b] forces the ordering OK/Cancel.
+ </member>
<member name="interface/editor/automatically_open_screenshots" type="bool" setter="" getter="">
If [code]true[/code], automatically opens screenshots with the default program associated to [code].png[/code] files after a screenshot is taken using the [b]Editor &gt; Take Screenshot[/b] action.
</member>
@@ -510,7 +516,7 @@
If set to [b]Auto[/b], the font hinting mode will be set to match the current operating system in use. This means the [b]Light[/b] hinting mode will be used on Windows and Linux, and the [b]None[/b] hinting mode will be used on macOS.
</member>
<member name="interface/editor/font_subpixel_positioning" type="int" setter="" getter="">
- The subpixel positioning mode to use when rendering editor font glyphs. This affects both the main and code fonts. [b]Disabled[/b] is the fastest to render and uses the least memory. [b]Auto[/b] only uses subpixel positioning for small font sizes (where the benefit is the most noticeable). [b]One half of a pixel[/b] and [b]One quarter of a pixel[/b] force the same subpixel positioning mode for all editor fonts, regardless of their size (with [b]One quarter of a pixel[/b] being the highest-quality option).
+ The subpixel positioning mode to use when rendering editor font glyphs. This affects both the main and code fonts. [b]Disabled[/b] is the fastest to render and uses the least memory. [b]Auto[/b] only uses subpixel positioning for small font sizes (where the benefit is the most noticeable). [b]One Half of a Pixel[/b] and [b]One Quarter of a Pixel[/b] force the same subpixel positioning mode for all editor fonts, regardless of their size (with [b]One Quarter of a Pixel[/b] being the highest-quality option).
</member>
<member name="interface/editor/low_processor_mode_sleep_usec" type="float" setter="" getter="">
The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU/GPU usage, which can improve battery life on laptops. However, higher values will result in a less responsive editor. The default value is set to allow for maximum smoothness on monitors up to 144 Hz. See also [member interface/editor/unfocused_low_processor_mode_sleep_usec].
@@ -671,19 +677,19 @@
If [code]true[/code], displays line length guidelines to help you keep line lengths in check. See also [member text_editor/appearance/guidelines/line_length_guideline_soft_column] and [member text_editor/appearance/guidelines/line_length_guideline_hard_column].
</member>
<member name="text_editor/appearance/gutters/highlight_type_safe_lines" type="bool" setter="" getter="">
- If [code]true[/code], highlights type-safe lines by displaying their line number color with [member text_editor/theme/highlighting/safe_line_number_color] instead of [member text_editor/theme/highlighting/line_number_color]. Type-safe lines are lines of code where the type of all variables is known at compile-time. These type-safe lines will run faster in Godot 4.0 and later thanks to typed instructions.
+ If [code]true[/code], highlights type-safe lines by displaying their line number color with [member text_editor/theme/highlighting/safe_line_number_color] instead of [member text_editor/theme/highlighting/line_number_color]. Type-safe lines are lines of code where the type of all variables is known at compile-time. These type-safe lines may run faster thanks to typed instructions.
</member>
<member name="text_editor/appearance/gutters/line_numbers_zero_padded" type="bool" setter="" getter="">
If [code]true[/code], displays line numbers with zero padding (e.g. [code]007[/code] instead of [code]7[/code]).
</member>
<member name="text_editor/appearance/gutters/show_bookmark_gutter" type="bool" setter="" getter="">
- If [code]true[/code], displays a gutter at the left containing icons for bookmarks.
+ If [code]true[/code], displays icons for bookmarks in a gutter at the left. Bookmarks remain functional when this setting is disabled.
</member>
<member name="text_editor/appearance/gutters/show_info_gutter" type="bool" setter="" getter="">
If [code]true[/code], displays a gutter at the left containing icons for methods with signal connections.
</member>
<member name="text_editor/appearance/gutters/show_line_numbers" type="bool" setter="" getter="">
- If [code]true[/code], displays line numbers in the gutter at the left.
+ If [code]true[/code], displays line numbers in a gutter at the left.
</member>
<member name="text_editor/appearance/lines/code_folding" type="bool" setter="" getter="">
If [code]true[/code], displays the folding arrows next to indented code sections and allows code folding. If [code]false[/code], hides the folding arrows next to indented code sections and disallows code folding.
@@ -752,7 +758,7 @@
[b]Note:[/b] You can hold down [kbd]Alt[/kbd] while using the mouse wheel to temporarily scroll 5 times faster.
</member>
<member name="text_editor/completion/add_type_hints" type="bool" setter="" getter="">
- If [code]true[/code], adds static typing hints such as [code]-&gt; void[/code] and [code]: int[/code] when performing method definition autocompletion.
+ If [code]true[/code], adds static typing hints such as [code]-&gt; void[/code] and [code]: int[/code] when using code autocompletion or when creating onready variables by drag and dropping nodes into the script editor while pressing the [kbd]Ctrl[/kbd] key.
</member>
<member name="text_editor/completion/auto_brace_complete" type="bool" setter="" getter="">
If [code]true[/code], automatically completes braces when making use of code completion.
@@ -803,7 +809,7 @@
The script editor's background color. If set to a translucent color, the editor theme's base color will be visible behind.
</member>
<member name="text_editor/theme/highlighting/base_type_color" type="Color" setter="" getter="">
- The script editor's base type color (used for types like [Vector2], [Vector3], ...).
+ The script editor's base type color (used for types like [Vector2], [Vector3], [Color], ...).
</member>
<member name="text_editor/theme/highlighting/bookmark_color" type="Color" setter="" getter="">
The script editor's bookmark icon color (displayed in the gutter).
@@ -863,10 +869,10 @@
[b]Note:[/b] When using the GDScript syntax highlighter, this is replaced by the function definition color configured in the syntax theme for function definitions (e.g. [code]func _ready():[/code]).
</member>
<member name="text_editor/theme/highlighting/keyword_color" type="Color" setter="" getter="">
- The script editor's non-control flow keyword color (used for keywords like [code]var[/code], [code]func[/code], some built-in methods, ...).
+ The script editor's non-control flow keyword color (used for keywords like [code]var[/code], [code]func[/code], [code]extends[/code], ...).
</member>
<member name="text_editor/theme/highlighting/line_length_guideline_color" type="Color" setter="" getter="">
- The script editor's color for the line length guideline. The "hard" line length guideline will be drawn with this color, whereas the "soft" line length guideline will be drawn with an opacity twice as low.
+ The script editor's color for the line length guideline. The "hard" line length guideline will be drawn with this color, whereas the "soft" line length guideline will be drawn with half of its opacity.
</member>
<member name="text_editor/theme/highlighting/line_number_color" type="Color" setter="" getter="">
The script editor's color for line numbers. See also [member text_editor/theme/highlighting/safe_line_number_color].
@@ -907,7 +913,7 @@
The script editor's background color for text. This should be set to a translucent color so that it can display on top of other line color modifiers such as [member text_editor/theme/highlighting/current_line_color].
</member>
<member name="text_editor/theme/highlighting/user_type_color" type="Color" setter="" getter="">
- The script editor's color for user-defined types (using [code]@class_name[/code]).
+ The script editor's color for user-defined types (using [code]class_name[/code]).
</member>
<member name="text_editor/theme/highlighting/word_highlighted_color" type="Color" setter="" getter="">
The script editor's color for words highlighted by selecting them. Only visible if [member text_editor/appearance/caret/highlight_all_occurrences] is [code]true[/code].
diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml
index 2ada211dab..de105b32e1 100644
--- a/doc/classes/EditorSpinSlider.xml
+++ b/doc/classes/EditorSpinSlider.xml
@@ -10,14 +10,20 @@
</tutorials>
<members>
<member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false">
+ If [code]true[/code], the slider will not draw background.
</member>
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="hide_slider" type="bool" setter="set_hide_slider" getter="is_hiding_slider" default="false">
If [code]true[/code], the slider is hidden.
</member>
<member name="label" type="String" setter="set_label" getter="get_label" default="&quot;&quot;">
+ The text that displays to the left of the value.
</member>
<member name="read_only" type="bool" setter="set_read_only" getter="is_read_only" default="false">
+ If [code]true[/code], the slider can't be interacted with.
</member>
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" />
+ <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="1.0" />
<member name="suffix" type="String" setter="set_suffix" getter="get_suffix" default="&quot;&quot;">
The suffix to display after the value (in a faded color). This should generally be a plural word. You may have to use an abbreviation if the suffix is too long to be displayed.
</member>
diff --git a/doc/classes/EditorUndoRedoManager.xml b/doc/classes/EditorUndoRedoManager.xml
index 1350e4487c..133ee9db0d 100644
--- a/doc/classes/EditorUndoRedoManager.xml
+++ b/doc/classes/EditorUndoRedoManager.xml
@@ -107,6 +107,18 @@
</description>
</method>
</methods>
+ <signals>
+ <signal name="history_changed">
+ <description>
+ 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">
+ <description>
+ Emitted when the version of any history has changed as a result of undo or redo call.
+ </description>
+ </signal>
+ </signals>
<constants>
<constant name="GLOBAL_HISTORY" value="0" enum="SpecialHistory">
Global history not associated with any scene, but with external resources etc.
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index 4067c8261c..d583e07f59 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -146,11 +146,13 @@
<return type="ScriptLanguage" />
<param index="0" name="index" type="int" />
<description>
+ Returns an instance of a [ScriptLanguage] with the given index.
</description>
</method>
<method name="get_script_language_count">
<return type="int" />
<description>
+ Returns the number of available script languages. Use with [method get_script_language].
</description>
</method>
<method name="get_singleton" qualifiers="const">
@@ -163,6 +165,7 @@
<method name="get_singleton_list" qualifiers="const">
<return type="PackedStringArray" />
<description>
+ Returns a list of available global singletons.
</description>
</method>
<method name="get_version_info" qualifiers="const">
@@ -244,6 +247,7 @@
<return type="void" />
<param index="0" name="language" type="ScriptLanguage" />
<description>
+ Registers a [ScriptLanguage] instance to be available with [code]ScriptServer[/code].
</description>
</method>
<method name="register_singleton">
@@ -251,12 +255,14 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="instance" type="Object" />
<description>
+ Registers the given object as a singleton, globally available under [param name].
</description>
</method>
<method name="unregister_singleton">
<return type="void" />
<param index="0" name="name" type="StringName" />
<description>
+ Unregisters the singleton registered under [param name]. The singleton object is not freed. Only works with user-defined singletons created with [method register_singleton].
</description>
</method>
</methods>
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index 243a28e73d..33b6a786ae 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -301,6 +301,7 @@
<member name="volumetric_fog_density" type="float" setter="set_volumetric_fog_density" getter="get_volumetric_fog_density" default="0.05">
The base [i]exponential[/i] density of the volumetric fog. Set this to the lowest density you want to have globally. [FogVolume]s can be used to add to or subtract from this density in specific areas. Fog rendering is exponential as in real life.
A value of [code]0.0[/code] disables global volumetric fog while allowing [FogVolume]s to display volumetric fog in specific areas.
+ To make volumetric fog work as a volumetric [i]lighting[/i] solution, set [member volumetric_fog_density] to the lowest non-zero value ([code]0.0001[/code]) then increase lights' [member Light3D.light_volumetric_fog_energy] to values between [code]10000[/code] and [code]100000[/code] to compensate for the very low density.
</member>
<member name="volumetric_fog_detail_spread" type="float" setter="set_volumetric_fog_detail_spread" getter="get_volumetric_fog_detail_spread" default="2.0">
The distribution of size down the length of the froxel buffer. A higher value compresses the froxels closer to the camera and places more detail closer to the camera.
diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml
index 3a397f56a9..4670e0c382 100644
--- a/doc/classes/Expression.xml
+++ b/doc/classes/Expression.xml
@@ -12,7 +12,7 @@
var expression = Expression.new()
func _ready():
- $LineEdit.connect("text_submitted", self, "_on_text_submitted")
+ $LineEdit.text_submitted.connect(self._on_text_submitted)
func _on_text_submitted(command):
var error = expression.parse(command)
@@ -28,7 +28,7 @@
public override void _Ready()
{
- GetNode("LineEdit").Connect("text_submitted", this, nameof(OnTextEntered));
+ GetNode("LineEdit").TextSubmitted += OnTextEntered;
}
private void OnTextEntered(string command)
diff --git a/doc/classes/FlowContainer.xml b/doc/classes/FlowContainer.xml
index d449049ef1..7a324160c9 100644
--- a/doc/classes/FlowContainer.xml
+++ b/doc/classes/FlowContainer.xml
@@ -18,11 +18,25 @@
</method>
</methods>
<members>
+ <member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="FlowContainer.AlignmentMode" default="0">
+ The alignment of the container's children (must be one of [constant ALIGNMENT_BEGIN], [constant ALIGNMENT_CENTER], or [constant ALIGNMENT_END]).
+ </member>
<member name="vertical" type="bool" setter="set_vertical" getter="is_vertical" default="false">
If [code]true[/code], the [FlowContainer] will arrange its children vertically, rather than horizontally.
Can't be changed when using [HFlowContainer] and [VFlowContainer].
</member>
</members>
+ <constants>
+ <constant name="ALIGNMENT_BEGIN" value="0" enum="AlignmentMode">
+ The child controls will be arranged at the beginning of the container, i.e. top if orientation is vertical, left if orientation is horizontal (right for RTL layout).
+ </constant>
+ <constant name="ALIGNMENT_CENTER" value="1" enum="AlignmentMode">
+ The child controls will be centered in the container.
+ </constant>
+ <constant name="ALIGNMENT_END" value="2" enum="AlignmentMode">
+ The child controls will be arranged at the end of the container, i.e. bottom if orientation is vertical, right if orientation is horizontal (left for RTL layout).
+ </constant>
+ </constants>
<theme_items>
<theme_item name="h_separation" data_type="constant" type="int" default="4">
The horizontal separation of children nodes.
diff --git a/doc/classes/FogMaterial.xml b/doc/classes/FogMaterial.xml
index 7428d6169a..aab6be4212 100644
--- a/doc/classes/FogMaterial.xml
+++ b/doc/classes/FogMaterial.xml
@@ -15,6 +15,7 @@
</member>
<member name="density" type="float" setter="set_density" getter="get_density" default="1.0">
The density of the [FogVolume]. Denser objects are more opaque, but may suffer from under-sampling artifacts that look like stripes. Negative values can be used to subtract fog from other [FogVolume]s or global volumetric fog.
+ [b]Note:[/b] Due to limited precision, [member density] values between [code]-0.001[/code] and [code]0.001[/code] (exclusive) act like [code]0.0[/code]. This does not apply to [member Environment.volumetric_fog_density].
</member>
<member name="density_texture" type="Texture3D" setter="set_density_texture" getter="get_density_texture">
The 3D texture that is used to scale the [member density] of the [FogVolume]. This can be used to vary fog density within the [FogVolume] with any kind of static pattern. For animated effects, consider using a custom [url=$DOCS_URL/tutorials/shaders/shader_reference/fog_shader.html]fog shader[/url].
diff --git a/doc/classes/FontFile.xml b/doc/classes/FontFile.xml
index df378d9d2f..271f6a13e0 100644
--- a/doc/classes/FontFile.xml
+++ b/doc/classes/FontFile.xml
@@ -14,7 +14,6 @@
[b]Note:[/b] A character is a symbol that represents an item (letter, digit etc.) in an abstract way.
[b]Note:[/b] A glyph is a bitmap or shape used to draw a one or more characters in a context-dependent manner. Glyph indices are bound to the specific font data source.
[b]Note:[/b] If a none of the font data sources contain glyphs for a character used in a string, the character in question will be replaced with a box displaying its hexadecimal code.
-
[codeblocks]
[gdscript]
var f = load("res://BarlowCondensed-Bold.ttf")
@@ -262,7 +261,7 @@
<param index="1" name="size" type="Vector2i" />
<param index="2" name="texture_index" type="int" />
<description>
- Returns a copy of the array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+ Returns a copy of the array containing glyph packing data.
</description>
</method>
<method name="get_transform" qualifiers="const">
@@ -522,7 +521,7 @@
<param index="2" name="texture_index" type="int" />
<param index="3" name="offset" type="PackedInt32Array" />
<description>
- Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty (for the fonts without dynamic glyph generation support).
+ Sets array containing glyph packing data.
</description>
</method>
<method name="set_transform">
@@ -589,7 +588,7 @@
Font style name.
</member>
<member name="subpixel_positioning" type="int" setter="set_subpixel_positioning" getter="get_subpixel_positioning" enum="TextServer.SubpixelPositioning" default="1">
- Font glyph sub-pixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size.
+ Font glyph subpixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size.
</member>
</members>
</class>
diff --git a/doc/classes/FontVariation.xml b/doc/classes/FontVariation.xml
index 6aa381c2de..e0fad126b9 100644
--- a/doc/classes/FontVariation.xml
+++ b/doc/classes/FontVariation.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
OpenType variations, simulated bold / slant, and additional font settings like OpenType features and extra spacing.
-
To use simulated bold font variant:
[codeblocks]
[gdscript]
diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml
index f41e34c43a..c7d10078e8 100644
--- a/doc/classes/GPUParticles2D.xml
+++ b/doc/classes/GPUParticles2D.xml
@@ -9,7 +9,8 @@
</description>
<tutorials>
<link title="Particle systems (2D)">$DOCS_URL/tutorials/2d/particle_systems_2d.html</link>
- <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
+ <link title="2D Particles Demo">https://godotengine.org/asset-library/asset/118</link>
+ <link title="2D Dodge The Creeps Demo (uses GPUParticles2D for the trail behind the player)">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
<method name="capture_rect" qualifiers="const">
@@ -52,7 +53,7 @@
How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins.
</member>
<member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="30">
- The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself.
+ The particle system's frame rate is fixed to a value. For example, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself.
</member>
<member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true">
If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect.
@@ -88,12 +89,17 @@
Particle texture. If [code]null[/code], particles will be squares.
</member>
<member name="trail_enabled" type="bool" setter="set_trail_enabled" getter="is_trail_enabled" default="false">
+ If [code]true[/code], enables particle trails using a mesh skinning system.
+ [b]Note:[/b] Unlike [GPUParticles3D], the number of trail sections and subdivisions is set with the [member trail_sections] and [member trail_section_subdivisions] properties.
</member>
- <member name="trail_length_secs" type="float" setter="set_trail_length" getter="get_trail_length" default="0.3">
+ <member name="trail_lifetime" type="float" setter="set_trail_lifetime" getter="get_trail_lifetime" default="0.3">
+ The amount of time the particle's trail should represent (in seconds). Only effective if [member trail_enabled] is [code]true[/code].
</member>
<member name="trail_section_subdivisions" type="int" setter="set_trail_section_subdivisions" getter="get_trail_section_subdivisions" default="4">
+ The number of subdivisions to use for the particle trail rendering. Higher values can result in smoother trail curves, at the cost of performance due to increased mesh complexity. See also [member trail_sections]. Only effective if [member trail_enabled] is [code]true[/code].
</member>
<member name="trail_sections" type="int" setter="set_trail_sections" getter="get_trail_sections" default="8">
+ The number of sections to use for the particle trail rendering. Higher values can result in smoother trail curves, at the cost of performance due to increased mesh complexity. See also [member trail_section_subdivisions]. Only effective if [member trail_enabled] is [code]true[/code].
</member>
<member name="visibility_rect" type="Rect2" setter="set_visibility_rect" getter="get_visibility_rect" default="Rect2(-100, -100, 200, 200)">
The [Rect2] that determines the node's region which needs to be visible on screen for the particle system to be active.
diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml
index e7b436010e..ea53c5b4b5 100644
--- a/doc/classes/GPUParticles3D.xml
+++ b/doc/classes/GPUParticles3D.xml
@@ -84,7 +84,7 @@
Time ratio between each emission. If [code]0[/code], particles are emitted continuously. If [code]1[/code], all particles are emitted simultaneously.
</member>
<member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="30">
- The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself.
+ The particle system's frame rate is fixed to a value. For example, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself.
</member>
<member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true">
If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect.
@@ -116,8 +116,12 @@
<member name="sub_emitter" type="NodePath" setter="set_sub_emitter" getter="get_sub_emitter" default="NodePath(&quot;&quot;)">
</member>
<member name="trail_enabled" type="bool" setter="set_trail_enabled" getter="is_trail_enabled" default="false">
+ If [code]true[/code], enables particle trails using a mesh skinning system. Designed to work with [RibbonTrailMesh] and [TubeTrailMesh].
+ [b]Note:[/b] [member BaseMaterial3D.use_particle_trails] must also be enabled on the particle mesh's material. Otherwise, setting [member trail_enabled] to [code]true[/code] will have no effect.
+ [b]Note:[/b] Unlike [GPUParticles2D], the number of trail sections and subdivisions is set in the [RibbonTrailMesh] or the [TubeTrailMesh]'s properties.
</member>
- <member name="trail_length_secs" type="float" setter="set_trail_length" getter="get_trail_length" default="0.3">
+ <member name="trail_lifetime" type="float" setter="set_trail_lifetime" getter="get_trail_lifetime" default="0.3">
+ The amount of time the particle's trail should represent (in seconds). Only effective if [member trail_enabled] is [code]true[/code].
</member>
<member name="transform_align" type="int" setter="set_transform_align" getter="get_transform_align" enum="GPUParticles3D.TransformAlign" default="0">
</member>
diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml
index 4d8ab91718..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,26 +28,30 @@
<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>
<members>
- <member name="cast_shadow" type="int" setter="set_cast_shadows_setting" getter="get_cast_shadows_setting" enum="GeometryInstance3D.ShadowCastingSetting">
+ <member name="cast_shadow" type="int" setter="set_cast_shadows_setting" getter="get_cast_shadows_setting" enum="GeometryInstance3D.ShadowCastingSetting" default="1">
The selected shadow casting flag. See [enum ShadowCastingSetting] for possible values.
</member>
- <member name="extra_cull_margin" type="float" setter="set_extra_cull_margin" getter="get_extra_cull_margin">
+ <member name="extra_cull_margin" type="float" setter="set_extra_cull_margin" getter="get_extra_cull_margin" default="0.0">
The extra distance added to the GeometryInstance3D's bounding box ([AABB]) to increase its cull box.
</member>
- <member name="gi_lightmap_scale" type="int" setter="set_lightmap_scale" getter="get_lightmap_scale" enum="GeometryInstance3D.LightmapScale">
+ <member name="gi_lightmap_scale" type="int" setter="set_lightmap_scale" getter="get_lightmap_scale" enum="GeometryInstance3D.LightmapScale" default="0">
The texel density to use for lightmapping in [LightmapGI]. Greater scale values provide higher resolution in the lightmap, which can result in sharper shadows for lights that have both direct and indirect light baked. However, greater scale values will also increase the space taken by the mesh in the lightmap texture, which increases the memory, storage, and bake time requirements. When using a single mesh at different scales, consider adjusting this value to keep the lightmap texel density consistent across meshes.
</member>
- <member name="gi_mode" type="int" setter="set_gi_mode" getter="get_gi_mode" enum="GeometryInstance3D.GIMode">
+ <member name="gi_mode" type="int" setter="set_gi_mode" getter="get_gi_mode" enum="GeometryInstance3D.GIMode" default="1">
The global illumination mode to use for the whole geometry. To avoid inconsistent results, use a mode that matches the purpose of the mesh during gameplay (static/dynamic).
[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">
+ <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">
+ <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.
@@ -56,26 +61,26 @@
The material override for the whole geometry.
If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh.
</member>
- <member name="transparency" type="float" setter="set_transparency" getter="get_transparency">
+ <member name="transparency" type="float" setter="set_transparency" getter="get_transparency" default="0.0">
The transparency applied to the whole geometry (as a multiplier of the materials' existing transparency). [code]0.0[/code] is fully opaque, while [code]1.0[/code] is fully transparent. Values greater than [code]0.0[/code] (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting [member transparency] to a value greater than [code]0.0[/code] (exclusive) will [i]not[/i] disable shadow rendering.
In spatial shaders, [code]1.0 - transparency[/code] is set as the default value of the [code]ALPHA[/code] built-in.
[b]Note:[/b] [member transparency] is clamped between [code]0.0[/code] and [code]1.0[/code], so this property cannot be used to make transparent materials more opaque than they originally are.
</member>
- <member name="visibility_range_begin" type="float" setter="set_visibility_range_begin" getter="get_visibility_range_begin">
+ <member name="visibility_range_begin" type="float" setter="set_visibility_range_begin" getter="get_visibility_range_begin" default="0.0">
Starting distance from which the GeometryInstance3D will be visible, taking [member visibility_range_begin_margin] into account as well. The default value of 0 is used to disable the range check.
</member>
- <member name="visibility_range_begin_margin" type="float" setter="set_visibility_range_begin_margin" getter="get_visibility_range_begin_margin">
+ <member name="visibility_range_begin_margin" type="float" setter="set_visibility_range_begin_margin" getter="get_visibility_range_begin_margin" default="0.0">
Margin for the [member visibility_range_begin] threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the [member visibility_range_begin] threshold by this amount.
If [member visibility_range_fade_mode] is [constant VISIBILITY_RANGE_FADE_DISABLED], this acts as an hysteresis distance. If [member visibility_range_fade_mode] is [constant VISIBILITY_RANGE_FADE_SELF] or [constant VISIBILITY_RANGE_FADE_DEPENDENCIES], this acts as a fade transition distance and must be set to a value greater than [code]0.0[/code] for the effect to be noticeable.
</member>
- <member name="visibility_range_end" type="float" setter="set_visibility_range_end" getter="get_visibility_range_end">
+ <member name="visibility_range_end" type="float" setter="set_visibility_range_end" getter="get_visibility_range_end" default="0.0">
Distance from which the GeometryInstance3D will be hidden, taking [member visibility_range_end_margin] into account as well. The default value of 0 is used to disable the range check.
</member>
- <member name="visibility_range_end_margin" type="float" setter="set_visibility_range_end_margin" getter="get_visibility_range_end_margin">
+ <member name="visibility_range_end_margin" type="float" setter="set_visibility_range_end_margin" getter="get_visibility_range_end_margin" default="0.0">
Margin for the [member visibility_range_end] threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the [member visibility_range_end] threshold by this amount.
If [member visibility_range_fade_mode] is [constant VISIBILITY_RANGE_FADE_DISABLED], this acts as an hysteresis distance. If [member visibility_range_fade_mode] is [constant VISIBILITY_RANGE_FADE_SELF] or [constant VISIBILITY_RANGE_FADE_DEPENDENCIES], this acts as a fade transition distance and must be set to a value greater than [code]0.0[/code] for the effect to be noticeable.
</member>
- <member name="visibility_range_fade_mode" type="int" setter="set_visibility_range_fade_mode" getter="get_visibility_range_fade_mode" enum="GeometryInstance3D.VisibilityRangeFadeMode">
+ <member name="visibility_range_fade_mode" type="int" setter="set_visibility_range_fade_mode" getter="get_visibility_range_fade_mode" enum="GeometryInstance3D.VisibilityRangeFadeMode" default="0">
Controls which instances will be faded when approaching the limits of the visibility range. See [enum VisibilityRangeFadeMode] for possible values.
</member>
</members>
diff --git a/doc/classes/GradientTexture1D.xml b/doc/classes/GradientTexture1D.xml
index 3254754ac1..fa572eeed0 100644
--- a/doc/classes/GradientTexture1D.xml
+++ b/doc/classes/GradientTexture1D.xml
@@ -12,6 +12,7 @@
<member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient">
The [Gradient] that will be used to fill the texture.
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
<member name="use_hdr" type="bool" setter="set_use_hdr" getter="is_using_hdr" default="false">
If [code]true[/code], the generated texture will support high dynamic range ([constant Image.FORMAT_RGBAF] format). This allows for glow effects to work if [member Environment.glow_enabled] is [code]true[/code]. If [code]false[/code], the generated texture will use low dynamic range; overbright colors will be clamped ([constant Image.FORMAT_RGBA8] format).
</member>
diff --git a/doc/classes/GradientTexture2D.xml b/doc/classes/GradientTexture2D.xml
index 7561f1b947..87d86e7a59 100644
--- a/doc/classes/GradientTexture2D.xml
+++ b/doc/classes/GradientTexture2D.xml
@@ -27,6 +27,7 @@
<member name="repeat" type="int" setter="set_repeat" getter="get_repeat" enum="GradientTexture2D.Repeat" default="0">
The gradient repeat type, one of the [enum Repeat] values. The texture is filled starting from [member fill_from] to [member fill_to] offsets by default, but the gradient fill can be repeated to cover the entire texture.
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
<member name="use_hdr" type="bool" setter="set_use_hdr" getter="is_using_hdr" default="false">
If [code]true[/code], the generated texture will support high dynamic range ([constant Image.FORMAT_RGBAF] format). This allows for glow effects to work if [member Environment.glow_enabled] is [code]true[/code]. If [code]false[/code], the generated texture will use low dynamic range; overbright colors will be clamped ([constant Image.FORMAT_RGBA8] format).
</member>
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index 64a3315308..c504e26d58 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -30,7 +30,6 @@
if error != OK:
push_error("An error occurred in the HTTP request.")
-
# Called when the HTTP request is completed.
func _http_request_completed(result, response_code, headers, body):
var json = JSON.new()
@@ -95,7 +94,6 @@
if error != OK:
push_error("An error occurred in the HTTP request.")
-
# Called when the HTTP request is completed.
func _http_request_completed(result, response_code, headers, body):
if result != HTTPRequest.RESULT_SUCCESS:
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index 510f14ec54..be66b8a7b9 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -26,7 +26,7 @@
<param index="1" name="src_rect" type="Rect2i" />
<param index="2" name="dst" type="Vector2i" />
<description>
- Alpha-blends [param src_rect] from [param src] image to this image at coordinates [param dst], clipped accordingly to both image bounds. This image and [param src] image [b]must[/b] have the same format. [param src_rect] with not positive size is treated as empty.
+ Alpha-blends [param src_rect] from [param src] image to this image at coordinates [param dst], clipped accordingly to both image bounds. This image and [param src] image [b]must[/b] have the same format. [param src_rect] with non-positive size is treated as empty.
</description>
</method>
<method name="blend_rect_mask">
@@ -36,7 +36,7 @@
<param index="2" name="src_rect" type="Rect2i" />
<param index="3" name="dst" type="Vector2i" />
<description>
- Alpha-blends [param src_rect] from [param src] image to this image using [param mask] image at coordinates [param dst], clipped accordingly to both image bounds. Alpha channels are required for both [param src] and [param mask]. [param dst] pixels and [param src] pixels will blend if the corresponding mask pixel's alpha value is not 0. This image and [param src] image [b]must[/b] have the same format. [param src] image and [param mask] image [b]must[/b] have the same size (width and height) but they can have different formats. [param src_rect] with not positive size is treated as empty.
+ Alpha-blends [param src_rect] from [param src] image to this image using [param mask] image at coordinates [param dst], clipped accordingly to both image bounds. Alpha channels are required for both [param src] and [param mask]. [param dst] pixels and [param src] pixels will blend if the corresponding mask pixel's alpha value is not 0. This image and [param src] image [b]must[/b] have the same format. [param src] image and [param mask] image [b]must[/b] have the same size (width and height) but they can have different formats. [param src_rect] with non-positive size is treated as empty.
</description>
</method>
<method name="blit_rect">
@@ -45,7 +45,7 @@
<param index="1" name="src_rect" type="Rect2i" />
<param index="2" name="dst" type="Vector2i" />
<description>
- Copies [param src_rect] from [param src] image to this image at coordinates [param dst], clipped accordingly to both image bounds. This image and [param src] image [b]must[/b] have the same format. [param src_rect] with not positive size is treated as empty.
+ Copies [param src_rect] from [param src] image to this image at coordinates [param dst], clipped accordingly to both image bounds. This image and [param src] image [b]must[/b] have the same format. [param src_rect] with non-positive size is treated as empty.
</description>
</method>
<method name="blit_rect_mask">
@@ -55,7 +55,7 @@
<param index="2" name="src_rect" type="Rect2i" />
<param index="3" name="dst" type="Vector2i" />
<description>
- Blits [param src_rect] area from [param src] image to this image at the coordinates given by [param dst], clipped accordingly to both image bounds. [param src] pixel is copied onto [param dst] if the corresponding [param mask] pixel's alpha value is not 0. This image and [param src] image [b]must[/b] have the same format. [param src] image and [param mask] image [b]must[/b] have the same size (width and height) but they can have different formats. [param src_rect] with not positive size is treated as empty.
+ Blits [param src_rect] area from [param src] image to this image at the coordinates given by [param dst], clipped accordingly to both image bounds. [param src] pixel is copied onto [param dst] if the corresponding [param mask] pixel's alpha value is not 0. This image and [param src] image [b]must[/b] have the same format. [param src] image and [param mask] image [b]must[/b] have the same size (width and height) but they can have different formats. [param src_rect] with non-positive size is treated as empty.
</description>
</method>
<method name="bump_map_to_normal_map">
@@ -111,18 +111,18 @@
Copies [param src] image to this image.
</description>
</method>
- <method name="create">
- <return type="void" />
+ <method name="create" qualifiers="static">
+ <return type="Image" />
<param index="0" name="width" type="int" />
<param index="1" name="height" type="int" />
<param index="2" name="use_mipmaps" type="bool" />
<param index="3" name="format" type="int" enum="Image.Format" />
<description>
- Creates an empty image of given size and format. See [enum Format] constants. If [param use_mipmaps] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps].
+ Creates an empty image of given size and format. See [enum Format] constants. If [param use_mipmaps] is [code]true[/code], then generate mipmaps for this image. See the [method generate_mipmaps].
</description>
</method>
- <method name="create_from_data">
- <return type="void" />
+ <method name="create_from_data" qualifiers="static">
+ <return type="Image" />
<param index="0" name="width" type="int" />
<param index="1" name="height" type="int" />
<param index="2" name="use_mipmaps" type="bool" />
@@ -241,11 +241,11 @@
This is the same as [method get_pixel], but with a [Vector2i] argument instead of two integer arguments.
</description>
</method>
- <method name="get_rect" qualifiers="const">
+ <method name="get_region" qualifiers="const">
<return type="Image" />
- <param index="0" name="rect" type="Rect2i" />
+ <param index="0" name="region" type="Rect2i" />
<description>
- Returns a new image that is a copy of the image's area specified with [param rect].
+ Returns a new [Image] that is a copy of this [Image]'s area specified with [param region].
</description>
</method>
<method name="get_size" qualifiers="const">
@@ -454,13 +454,25 @@
Saves the image as a WebP (Web Picture) file to a byte array. By default it will save lossless. If [param lossy] is true, the image will be saved lossy, using the [param quality] setting between 0.0 and 1.0 (inclusive).
</description>
</method>
+ <method name="set_data">
+ <return type="void" />
+ <param index="0" name="width" type="int" />
+ <param index="1" name="height" type="int" />
+ <param index="2" name="use_mipmaps" type="bool" />
+ <param index="3" name="format" type="int" enum="Image.Format" />
+ <param index="4" name="data" type="PackedByteArray" />
+ <description>
+ Overwrites data of an existing [Image]. Non-static equivalent of [method create_from_data].
+ </description>
+ </method>
<method name="set_pixel">
<return type="void" />
<param index="0" name="x" type="int" />
<param index="1" name="y" type="int" />
<param index="2" name="color" type="Color" />
<description>
- Sets the [Color] of the pixel at [code](x, y)[/code] to [param color]. Example:
+ Sets the [Color] of the pixel at [code](x, y)[/code] to [param color].
+ [b]Example:[/b]
[codeblocks]
[gdscript]
var img_width = 10
@@ -487,7 +499,8 @@
<param index="0" name="point" type="Vector2i" />
<param index="1" name="color" type="Color" />
<description>
- Sets the [Color] of the pixel at [param point] to [param color]. Example:
+ Sets the [Color] of the pixel at [param point] to [param color].
+ [b]Example:[/b]
[codeblocks]
[gdscript]
var img_width = 10
diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml
index 45cbd7ac87..03d1947475 100644
--- a/doc/classes/ImageTexture.xml
+++ b/doc/classes/ImageTexture.xml
@@ -67,4 +67,7 @@
</description>
</method>
</methods>
+ <members>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
+ </members>
</class>
diff --git a/doc/classes/ImageTexture3D.xml b/doc/classes/ImageTexture3D.xml
index 958c5f90f1..ee26a959aa 100644
--- a/doc/classes/ImageTexture3D.xml
+++ b/doc/classes/ImageTexture3D.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ImageTexture3D" inherits="Texture3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Texture with 3 dimensions.
</brief_description>
<description>
+ [ImageTexture3D] is a 3-dimensional [ImageTexture] that has a width, height, and depth. See also [ImageTextureLayered].
+ 3D textures are typically used to store density maps for [FogMaterial], color correction LUTs for [Environment], vector fields for [GPUParticlesAttractorVectorField3D] and collision maps for [GPUParticlesCollisionSDF3D]. 3D textures can also be used in custom shaders.
</description>
<tutorials>
</tutorials>
@@ -16,12 +19,14 @@
<param index="4" name="use_mipmaps" type="bool" />
<param index="5" name="data" type="Image[]" />
<description>
+ Creates the [ImageTexture3D] with specified [param width], [param height], and [param depth]. See [enum Image.Format] for [param format] options. If [param use_mipmaps] is [code]true[/code], then generate mipmaps for the [ImageTexture3D].
</description>
</method>
<method name="update">
<return type="void" />
<param index="0" name="data" type="Image[]" />
<description>
+ Replaces the texture's existing data with the layers specified in [code]data[/code]. The size of [code]data[/code] must match the parameters that were used for [method create]. In other words, the texture cannot be resized or have its format changed by calling [method update].
</description>
</method>
</methods>
diff --git a/doc/classes/ImageTextureLayered.xml b/doc/classes/ImageTextureLayered.xml
index f5786f070a..0aa1d65d5a 100644
--- a/doc/classes/ImageTextureLayered.xml
+++ b/doc/classes/ImageTextureLayered.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ImageTextureLayered" inherits="TextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Base class for texture types which contain the data of multiple [ImageTexture]s. Each image is of the same size and format.
</brief_description>
<description>
+ Base class for [Texture2DArray], [Cubemap] and [CubemapArray]. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also [Texture3D].
</description>
<tutorials>
</tutorials>
@@ -11,7 +13,7 @@
<return type="int" enum="Error" />
<param index="0" name="images" type="Image[]" />
<description>
- Creates an [ImageTextureLayered] from an array of [Image]s. The first image decides the width, height, image format and mipmapping setting. The other images must have the same width, height, image format and mipmapping setting.
+ Creates an [ImageTextureLayered] from an array of [Image]s. See [method Image.create] for the expected data format. The first image decides the width, height, image format and mipmapping setting. The other images [i]must[/i] have the same width, height, image format and mipmapping setting.
Each [Image] represents one [code]layer[/code].
</description>
</method>
@@ -23,7 +25,7 @@
Replaces the existing [Image] data at the given [code]layer[/code] with this new image.
The given [Image] must have the same width, height, image format and mipmapping setting (a [code]bool[/code] value) as the rest of the referenced images.
If the image format is unsupported, it will be decompressed and converted to a similar and supported [enum Image.Format].
- The update is immediate: synced with the draw.
+ The update is immediate: it's synchronized with drawing.
</description>
</method>
</methods>
diff --git a/doc/classes/ImporterMesh.xml b/doc/classes/ImporterMesh.xml
index 1c9655c266..b80857a7bf 100644
--- a/doc/classes/ImporterMesh.xml
+++ b/doc/classes/ImporterMesh.xml
@@ -5,7 +5,6 @@
</brief_description>
<description>
ImporterMesh is a type of [Resource] analogous to [ArrayMesh]. It contains vertex array-based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials.
-
Unlike its runtime counterpart, [ImporterMesh] contains mesh data before various import steps, such as lod and shadow mesh generation, have taken place. Modify surface data by calling [method clear], followed by [method add_surface] for each surface.
</description>
<tutorials>
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index 56b95fc755..d246e64251 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -157,7 +157,7 @@
<method name="get_mouse_button_mask" qualifiers="const">
<return type="int" enum="MouseButton" />
<description>
- Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together.
+ Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to [method DisplayServer.mouse_get_button_state].
</description>
</method>
<method name="get_vector" qualifiers="const">
@@ -254,7 +254,7 @@
<param index="0" name="event" type="InputEvent" />
<description>
Feeds an [InputEvent] to the game. Can be used to artificially trigger input events from code. Also generates [method Node._input] calls.
- Example:
+ [b]Example:[/b]
[codeblocks]
[gdscript]
var cancel_event = InputEventAction.new()
@@ -366,7 +366,7 @@
<param index="0" name="position" type="Vector2" />
<description>
Sets the mouse position to the specified vector, provided in pixels and relative to an origin at the upper left corner of the currently focused Window Manager game window.
- Mouse position is clipped to the limits of the screen resolution, or to the limits of the game window if [enum MouseMode] is set to [code]MOUSE_MODE_CONFINED[/code] or [code]MOUSE_MODE_CONFINED_HIDDEN[/code].
+ Mouse position is clipped to the limits of the screen resolution, or to the limits of the game window if [enum MouseMode] is set to [constant MOUSE_MODE_CONFINED] or [constant MOUSE_MODE_CONFINED_HIDDEN].
</description>
</method>
</methods>
diff --git a/doc/classes/InputEventMIDI.xml b/doc/classes/InputEventMIDI.xml
index 2af88149b6..67e7ced2e8 100644
--- a/doc/classes/InputEventMIDI.xml
+++ b/doc/classes/InputEventMIDI.xml
@@ -69,18 +69,18 @@
The MIDI channel of this input event. There are 16 channels, so this value ranges from 0 to 15. MIDI channel 9 is reserved for the use with percussion instruments, the rest of the channels are for non-percussion instruments.
</member>
<member name="controller_number" type="int" setter="set_controller_number" getter="get_controller_number" default="0">
- If the message is [code]MIDI_MESSAGE_CONTROL_CHANGE[/code], this indicates the controller number, otherwise this is zero. Controllers include devices such as pedals and levers.
+ If the message is [constant MIDI_MESSAGE_CONTROL_CHANGE], this indicates the controller number, otherwise this is zero. Controllers include devices such as pedals and levers.
</member>
<member name="controller_value" type="int" setter="set_controller_value" getter="get_controller_value" default="0">
- If the message is [code]MIDI_MESSAGE_CONTROL_CHANGE[/code], this indicates the controller value, otherwise this is zero. Controllers include devices such as pedals and levers.
+ If the message is [constant MIDI_MESSAGE_CONTROL_CHANGE], this indicates the controller value, otherwise this is zero. Controllers include devices such as pedals and levers.
</member>
<member name="instrument" type="int" setter="set_instrument" getter="get_instrument" default="0">
The instrument of this input event. This value ranges from 0 to 127. Refer to the instrument list on the General MIDI wikipedia article to see a list of instruments, except that this value is 0-index, so subtract one from every number on that chart. A standard piano will have an instrument number of 0.
</member>
<member name="message" type="int" setter="set_message" getter="get_message" enum="MIDIMessage" default="0">
- Returns a value indicating the type of message for this MIDI signal. This is a member of the [enum @GlobalScope.MIDIMessage] enum.
+ Returns a value indicating the type of message for this MIDI signal. This is a member of the [enum MIDIMessage] enum.
For MIDI messages between 0x80 and 0xEF, only the left half of the bits are returned as this value, as the other part is the channel (ex: 0x94 becomes 0x9). For MIDI messages from 0xF0 to 0xFF, the value is returned as-is.
- Notes will return [code]MIDI_MESSAGE_NOTE_ON[/code] when activated, but they might not always return [code]MIDI_MESSAGE_NOTE_OFF[/code] when deactivated, therefore your code should treat the input as stopped if some period of time has passed.
+ Notes will return [constant MIDI_MESSAGE_NOTE_ON] when activated, but they might not always return [constant MIDI_MESSAGE_NOTE_OFF] when deactivated, therefore your code should treat the input as stopped if some period of time has passed.
For more information, see the MIDI message status byte list chart linked above.
</member>
<member name="pitch" type="int" setter="set_pitch" getter="get_pitch" default="0">
@@ -90,7 +90,7 @@
The pressure of the MIDI signal. This value ranges from 0 to 127. For many devices, this value is always zero.
</member>
<member name="velocity" type="int" setter="set_velocity" getter="get_velocity" default="0">
- The velocity of the MIDI signal. This value ranges from 0 to 127. For a piano, this corresponds to how quickly the key was pressed, and is rarely above about 110 in practice.
+ The velocity of the MIDI signal. This value ranges from 0 to 127. For a piano, this corresponds to how quickly the key was pressed, and is rarely above about 110 in practice. Note that some MIDI devices may send a [constant MIDI_MESSAGE_NOTE_ON] message with zero velocity and expect this to be treated the same as a [constant MIDI_MESSAGE_NOTE_OFF] message, but device implementations vary so Godot reports event data exactly as received.
</member>
</members>
</class>
diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml
index fb50454917..346b6bf732 100644
--- a/doc/classes/InputEventScreenTouch.xml
+++ b/doc/classes/InputEventScreenTouch.xml
@@ -11,6 +11,9 @@
<link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
</tutorials>
<members>
+ <member name="double_tap" type="bool" setter="set_double_tap" getter="is_double_tap" default="false">
+ If [code]true[/code], the touch's state is a double tap.
+ </member>
<member name="index" type="int" setter="set_index" getter="get_index" default="0">
The touch index in the case of a multi-touch event. One index = one finger.
</member>
diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml
index 125d016632..93731cf553 100644
--- a/doc/classes/JSON.xml
+++ b/doc/classes/JSON.xml
@@ -54,7 +54,7 @@
<param index="0" name="json_string" type="String" />
<description>
Attempts to parse the [param json_string] provided.
- Returns an [enum Error]. If the parse was successful, it returns [code]OK[/code] and the result can be retrieved using [member data]. If unsuccessful, use [method get_error_line] and [method get_error_message] for identifying the source of the failure.
+ Returns an [enum Error]. If the parse was successful, it returns [constant OK] and the result can be retrieved using [member data]. If unsuccessful, use [method get_error_line] and [method get_error_message] for identifying the source of the failure.
Non-static variant of [method parse_string], if you want custom error handling.
</description>
</method>
diff --git a/doc/classes/JavaScriptObject.xml b/doc/classes/JavaScriptObject.xml
index 26792bd19e..7132cc5cad 100644
--- a/doc/classes/JavaScriptObject.xml
+++ b/doc/classes/JavaScriptObject.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
JavaScriptObject is used to interact with JavaScript objects retrieved or created via [method JavaScriptBridge.get_interface], [method JavaScriptBridge.create_object], or [method JavaScriptBridge.create_callback].
- Example:
+ [b]Example:[/b]
[codeblock]
extends Node
diff --git a/doc/classes/Label3D.xml b/doc/classes/Label3D.xml
index b741dc6e64..0cbca2224e 100644
--- a/doc/classes/Label3D.xml
+++ b/doc/classes/Label3D.xml
@@ -44,6 +44,7 @@
<member name="billboard" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="BaseMaterial3D.BillboardMode" default="0">
The billboard mode to use for the label. See [enum BaseMaterial3D.BillboardMode] for possible values.
</member>
+ <member name="cast_shadow" type="int" setter="set_cast_shadows_setting" getter="get_cast_shadows_setting" overrides="GeometryInstance3D" enum="GeometryInstance3D.ShadowCastingSetting" default="0" />
<member name="double_sided" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="true">
If [code]true[/code], text can be seen from the back as well, if [code]false[/code], it is invisible when looking at it from behind.
</member>
@@ -57,6 +58,7 @@
Font size of the [Label3D]'s text. To make the font look more detailed when up close, increase [member font_size] while decreasing [member pixel_size] at the same time.
Higher font sizes require more time to render new characters, which can cause stuttering during gameplay.
</member>
+ <member name="gi_mode" type="int" setter="set_gi_mode" getter="get_gi_mode" overrides="GeometryInstance3D" enum="GeometryInstance3D.GIMode" default="0" />
<member name="horizontal_alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="1">
Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the [enum HorizontalAlignment] constants.
</member>
diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml
index e9ebbc0a41..60e20cd97d 100644
--- a/doc/classes/Light3D.xml
+++ b/doc/classes/Light3D.xml
@@ -55,6 +55,7 @@
</member>
<member name="light_angular_distance" type="float" setter="set_param" getter="get_param" default="0.0">
The light's angular size in degrees. Increasing this will make shadows softer at greater distances. Only available for [DirectionalLight3D]s. For reference, the Sun from the Earth is approximately [code]0.5[/code].
+ [b]Note:[/b] [member light_angular_distance] is not affected by [member Node3D.scale] (the light's scale or its parent's scale).
</member>
<member name="light_bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="Light3D.BakeMode" default="2">
The light's bake mode. This will affect the global illumination techniques that have an effect on the light's rendering. See [enum BakeMode].
@@ -91,6 +92,7 @@
</member>
<member name="light_size" type="float" setter="set_param" getter="get_param" default="0.0">
The size of the light in Godot units. Only available for [OmniLight3D]s and [SpotLight3D]s. Increasing this value will make the light fade out slower and shadows appear blurrier. This can be used to simulate area lights to an extent.
+ [b]Note:[/b] [member light_size] is not affected by [member Node3D.scale] (the light's scale or its parent's scale).
</member>
<member name="light_specular" type="float" setter="set_param" getter="get_param" default="0.5">
The intensity of the specular blob in objects affected by the light. At [code]0[/code], the light becomes a pure diffuse light. When not baking emission, this can be used to avoid unrealistic reflections when placing lights above an emissive surface.
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index 14fb864ca8..e57cc68b36 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -224,6 +224,9 @@
<member name="secret_character" type="String" setter="set_secret_character" getter="get_secret_character" default="&quot;•&quot;">
The character to use to mask secret input (defaults to "•"). Only a single character can be used as the secret character.
</member>
+ <member name="select_all_on_focus" type="bool" setter="set_select_all_on_focus" getter="is_select_all_on_focus" default="false">
+ If [code]true[/code], the [LineEdit] will select the whole text when it gains focus.
+ </member>
<member name="selecting_enabled" type="bool" setter="set_selecting_enabled" getter="is_selecting_enabled" default="true">
If [code]false[/code], it's impossible to select the text using mouse nor keyboard.
</member>
diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml
index 7c6ff2d4e1..d7701ea184 100644
--- a/doc/classes/LinkButton.xml
+++ b/doc/classes/LinkButton.xml
@@ -10,9 +10,11 @@
<tutorials>
</tutorials>
<members>
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="0" />
<member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
</member>
+ <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" overrides="Control" enum="Control.CursorShape" default="2" />
<member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="TextServer.StructuredTextParser" default="0">
Set BiDi algorithm override for the structured text.
</member>
diff --git a/doc/classes/Marker3D.xml b/doc/classes/Marker3D.xml
index 5ad1cdf513..0d49b376a8 100644
--- a/doc/classes/Marker3D.xml
+++ b/doc/classes/Marker3D.xml
@@ -8,4 +8,9 @@
</description>
<tutorials>
</tutorials>
+ <members>
+ <member name="gizmo_extents" type="float" setter="set_gizmo_extents" getter="get_gizmo_extents" default="0.25">
+ Size of the gizmo cross that appears in the editor.
+ </member>
+ </members>
</class>
diff --git a/doc/classes/MenuBar.xml b/doc/classes/MenuBar.xml
index 3ef0572e9f..e8505937ff 100644
--- a/doc/classes/MenuBar.xml
+++ b/doc/classes/MenuBar.xml
@@ -106,9 +106,6 @@
<member name="prefer_global_menu" type="bool" setter="set_prefer_global_menu" getter="is_prefer_global_menu" default="true">
If [code]true[/code], [MenuBar] will use system global menu when supported.
</member>
- <member name="shortcut_context" type="Node" setter="set_shortcut_context" getter="get_shortcut_context">
- The [Node] which must be a parent of the focused GUI [Control] for the shortcut to be activated. If [code]null[/code], the shortcut can be activated when any control is focused (a global shortcut). This allows shortcuts to be accepted only when the user has a certain area of the GUI focused.
- </member>
<member name="start_index" type="int" setter="set_start_index" getter="get_start_index" default="-1">
Position in the global menu to insert first [MenuBar] item at.
</member>
diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml
index d3d5a7bfaa..640fa9efec 100644
--- a/doc/classes/Mesh.xml
+++ b/doc/classes/Mesh.xml
@@ -129,7 +129,7 @@
<method name="get_aabb" qualifiers="const">
<return type="AABB" />
<description>
- Returns the smallest [AABB] enclosing this mesh in local space. Not affected by [code]custom_aabb[/code]. See also [method VisualInstance3D.get_transformed_aabb].
+ Returns the smallest [AABB] enclosing this mesh in local space. Not affected by [code]custom_aabb[/code].
[b]Note:[/b] This is only implemented for [ArrayMesh] and [PrimitiveMesh].
</description>
</method>
@@ -176,7 +176,7 @@
</method>
</methods>
<members>
- <member name="lightmap_size_hint" type="Vector2i" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint">
+ <member name="lightmap_size_hint" type="Vector2i" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint" default="Vector2i(0, 0)">
Sets a hint to be used for lightmap resolution.
</member>
</members>
diff --git a/doc/classes/MeshTexture.xml b/doc/classes/MeshTexture.xml
index 8e2bccc79f..d09fa4c898 100644
--- a/doc/classes/MeshTexture.xml
+++ b/doc/classes/MeshTexture.xml
@@ -18,5 +18,6 @@
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
Sets the mesh used to draw. It must be a mesh using 2D vertices.
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
</members>
</class>
diff --git a/doc/classes/MissingNode.xml b/doc/classes/MissingNode.xml
index b5aa02cfd6..ac54329313 100644
--- a/doc/classes/MissingNode.xml
+++ b/doc/classes/MissingNode.xml
@@ -4,7 +4,7 @@
This is an internal editor class intended for keeping data of nodes of unknown type.
</brief_description>
<description>
- This is an internal editor class intended for keeping data of nodes of unknown type (most likely this type was supplied by an extension that is no longer loaded). It can´t be manually instantiated or placed in the scene. Ignore it if you don't know what it is.
+ This is an internal editor class intended for keeping data of nodes of unknown type (most likely this type was supplied by an extension that is no longer loaded). It can't be manually instantiated or placed in the scene. Ignore it if you don't know what it is.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/MissingResource.xml b/doc/classes/MissingResource.xml
index eede6350d8..e5a6c4d064 100644
--- a/doc/classes/MissingResource.xml
+++ b/doc/classes/MissingResource.xml
@@ -4,7 +4,7 @@
This is an internal editor class intended for keeping data of resources of unknown type.
</brief_description>
<description>
- This is an internal editor class intended for keeping data of resources of unknown type (most likely this type was supplied by an extension that is no longer loaded). It can´t be manually instantiated or placed in the scene. Ignore it if you don't know what it is.
+ This is an internal editor class intended for keeping data of resources of unknown type (most likely this type was supplied by an extension that is no longer loaded). It can't be manually instantiated or placed in the scene. Ignore it if you don't know what it is.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/MovieWriter.xml b/doc/classes/MovieWriter.xml
index f2509ad2b2..1652dd52aa 100644
--- a/doc/classes/MovieWriter.xml
+++ b/doc/classes/MovieWriter.xml
@@ -4,7 +4,7 @@
Abstract class for non-real-time video recording encoders.
</brief_description>
<description>
- Godot can record videos with non-real-time simulation. Like the [code]--fixed-fps[/code] command line argument, this forces the reported [code]delta[/code] in [method Node._process] functions to be identical across frames, regardless of how long it actually took to render the frame. This can be used to record high-quality videos with perfect frame pacing regardless of your hardware's capabilities.
+ Godot can record videos with non-real-time simulation. Like the [code]--fixed-fps[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url], this forces the reported [code]delta[/code] in [method Node._process] functions to be identical across frames, regardless of how long it actually took to render the frame. This can be used to record high-quality videos with perfect frame pacing regardless of your hardware's capabilities.
Godot has 2 built-in [MovieWriter]s:
- AVI container with MJPEG for video and uncompressed audio ([code].avi[/code] file extension). Lossy compression, medium file sizes, fast encoding. The lossy compression quality can be adjusted by changing [member ProjectSettings.editor/movie_writer/mjpeg_quality]. The resulting file can be viewed in most video players, but it must be converted to another format for viewing on the web or by Godot with [VideoStreamPlayer]. MJPEG does not support transparency. AVI output is currently limited to a file of 4 GB in size at most.
- PNG image sequence for video and WAV for audio ([code].png[/code] file extension). Lossless compression, large file sizes, slow encoding. Designed to be encoded to a video file with another tool such as [url=https://ffmpeg.org/]FFmpeg[/url] after recording. Transparency is currently not supported, even if the root viewport is set to be transparent.
@@ -46,7 +46,7 @@
<param index="1" name="fps" type="int" />
<param index="2" name="base_path" type="String" />
<description>
- Called once before the engine starts writing video and audio data. [param movie_size] is the width and height of the video to save. [param fps] is the number of frames per second specified in the project settings or using the [code]--fixed-fps &lt;fps&gt;[/code] command line argument.
+ Called once before the engine starts writing video and audio data. [param movie_size] is the width and height of the video to save. [param fps] is the number of frames per second specified in the project settings or using the [code]--fixed-fps &lt;fps&gt;[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url].
</description>
</method>
<method name="_write_end" qualifiers="virtual">
diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml
index ce2b5f2584..d8a232b3cf 100644
--- a/doc/classes/MultiMesh.xml
+++ b/doc/classes/MultiMesh.xml
@@ -19,7 +19,7 @@
<method name="get_aabb" qualifiers="const">
<return type="AABB" />
<description>
- Returns the visibility axis-aligned bounding box in local space. See also [method VisualInstance3D.get_transformed_aabb].
+ Returns the visibility axis-aligned bounding box in local space.
</description>
</method>
<method name="get_instance_color" qualifiers="const">
diff --git a/doc/classes/MultiplayerPeer.xml b/doc/classes/MultiplayerPeer.xml
index 0f57ff9e55..dd7dac3f23 100644
--- a/doc/classes/MultiplayerPeer.xml
+++ b/doc/classes/MultiplayerPeer.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="MultiplayerPeer" inherits="PacketPeer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- A high-level network interface to simplify multiplayer interactions.
+ Abstract class for specialized [PacketPeer]s used by the [MultiplayerAPI].
</brief_description>
<description>
- Manages the connection to multiplayer peers. Assigns unique IDs to each client connected to the server. See also [MultiplayerAPI].
- [b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice.
+ Manages the connection with one or more remote peers acting as server or client and assigning unique IDs to each of them. See also [MultiplayerAPI].
+ [b]Note:[/b] The [MultiplayerAPI] protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice.
[b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
<tutorials>
@@ -13,6 +13,20 @@
<link title="WebRTC Signaling Demo">https://godotengine.org/asset-library/asset/537</link>
</tutorials>
<methods>
+ <method name="close">
+ <return type="void" />
+ <description>
+ Immediately close the multiplayer peer returning to the state [constant CONNECTION_DISCONNECTED]. Connected peers will be dropped without emitting [signal peer_disconnected].
+ </description>
+ </method>
+ <method name="disconnect_peer">
+ <return type="void" />
+ <param index="0" name="peer" type="int" />
+ <param index="1" name="force" type="bool" default="false" />
+ <description>
+ Disconnects the given [param peer] from this host. If [param force] is [code]true[/code] the [signal peer_disconnected] signal will not be emitted for this peer.
+ </description>
+ </method>
<method name="generate_unique_id" qualifiers="const">
<return type="int" />
<description>
@@ -25,10 +39,22 @@
Returns the current state of the connection. See [enum ConnectionStatus].
</description>
</method>
+ <method name="get_packet_channel" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the channel over which the next available packet was received. See [method PacketPeer.get_available_packet_count].
+ </description>
+ </method>
+ <method name="get_packet_mode" qualifiers="const">
+ <return type="int" enum="MultiplayerPeer.TransferMode" />
+ <description>
+ Returns the [enum MultiplayerPeer.TransferMode] the remote peer used to send the next available packet. See [method PacketPeer.get_available_packet_count].
+ </description>
+ </method>
<method name="get_packet_peer" qualifiers="const">
<return type="int" />
<description>
- Returns the ID of the [MultiplayerPeer] who sent the most recent packet.
+ Returns the ID of the [MultiplayerPeer] who sent the next available packet. See [method PacketPeer.get_available_packet_count].
</description>
</method>
<method name="get_unique_id" qualifiers="const">
@@ -37,6 +63,12 @@
Returns the ID of this [MultiplayerPeer].
</description>
</method>
+ <method name="is_server_relay_supported" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns true if the server can act as a relay in the current configuration (i.e. if the higher level [MultiplayerAPI] should notify connected clients of other peers, and implement a relay protocol to allow communication between them).
+ </description>
+ </method>
<method name="poll">
<return type="void" />
<description>
@@ -61,53 +93,38 @@
[b]Note:[/b] The default channel ([code]0[/code]) actually works as 3 separate channels (one for each [enum TransferMode]) so that [constant TRANSFER_MODE_RELIABLE] and [constant TRANSFER_MODE_UNRELIABLE_ORDERED] does not interact with each other by default. Refer to the specific network API documentation (e.g. ENet or WebRTC) to learn how to set up channels correctly.
</member>
<member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="MultiplayerPeer.TransferMode" default="2">
- The manner in which to send packets to the [code]target_peer[/code]. See [enum TransferMode].
+ The manner in which to send packets to the target peer. See [enum TransferMode], and the [method set_target_peer] method.
</member>
</members>
<signals>
- <signal name="connection_failed">
- <description>
- Emitted when a connection attempt fails.
- </description>
- </signal>
- <signal name="connection_succeeded">
- <description>
- Emitted when a connection attempt succeeds.
- </description>
- </signal>
<signal name="peer_connected">
<param index="0" name="id" type="int" />
<description>
- Emitted by the server when a client connects.
+ Emitted when a remote peer connects.
</description>
</signal>
<signal name="peer_disconnected">
<param index="0" name="id" type="int" />
<description>
- Emitted by the server when a client disconnects.
- </description>
- </signal>
- <signal name="server_disconnected">
- <description>
- Emitted by clients when the server disconnects.
+ Emitted when a remote peer has disconnected.
</description>
</signal>
</signals>
<constants>
<constant name="CONNECTION_DISCONNECTED" value="0" enum="ConnectionStatus">
- The ongoing connection disconnected.
+ The MultiplayerPeer is disconnected.
</constant>
<constant name="CONNECTION_CONNECTING" value="1" enum="ConnectionStatus">
- A connection attempt is ongoing.
+ The MultiplayerPeer is currently connecting to a server.
</constant>
<constant name="CONNECTION_CONNECTED" value="2" enum="ConnectionStatus">
- The connection attempt succeeded.
+ This MultiplayerPeer is connected.
</constant>
<constant name="TARGET_PEER_BROADCAST" value="0">
- Packets are sent to the server and then redistributed to other peers.
+ Packets are sent to all connected peers.
</constant>
<constant name="TARGET_PEER_SERVER" value="1">
- Packets are sent to the server alone.
+ Packets are sent to the remote peer acting as server.
</constant>
<constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode">
Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [constant TRANSFER_MODE_UNRELIABLE_ORDERED]. Use for non-critical data, and always consider whether the order matters.
diff --git a/doc/classes/MultiplayerPeerExtension.xml b/doc/classes/MultiplayerPeerExtension.xml
index 18bc18e6e7..5717135b80 100644
--- a/doc/classes/MultiplayerPeerExtension.xml
+++ b/doc/classes/MultiplayerPeerExtension.xml
@@ -9,6 +9,20 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_close" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ Called when the multiplayer peer should be immediately closed (see [method MultiplayerPeer.close]).
+ </description>
+ </method>
+ <method name="_disconnect_peer" qualifiers="virtual">
+ <return type="void" />
+ <param index="0" name="p_peer" type="int" />
+ <param index="1" name="p_force" type="bool" />
+ <description>
+ Called when the connected [param p_peer] should be forcibly disconnected (see [method MultiplayerPeer.disconnect_peer]).
+ </description>
+ </method>
<method name="_get_available_packet_count" qualifiers="virtual const">
<return type="int" />
<description>
diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml
index 3437e0eca4..8cf7824ff7 100644
--- a/doc/classes/NavigationAgent2D.xml
+++ b/doc/classes/NavigationAgent2D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
2D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. [NavigationAgent2D] is physics safe.
- [b]Note:[/b] After [method set_target_location] is used it is required to use the [method get_next_location] function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node.
+ [b]Note:[/b] After setting [member target_location] it is required to use the [method get_next_location] function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node.
</description>
<tutorials>
</tutorials>
@@ -13,7 +13,7 @@
<method name="distance_to_target" qualifiers="const">
<return type="float" />
<description>
- Returns the distance to the target location, using the agent's global position. The user must set the target location with [method set_target_location] in order for this to be accurate.
+ Returns the distance to the target location, using the agent's global position. The user must set [member target_location] in order for this to be accurate.
</description>
</method>
<method name="get_final_location">
@@ -59,12 +59,6 @@
Returns the [RID] of this agent on the [NavigationServer2D].
</description>
</method>
- <method name="get_target_location" qualifiers="const">
- <return type="Vector2" />
- <description>
- Returns the user defined [Vector2] after setting the target location.
- </description>
- </method>
<method name="is_navigation_finished">
<return type="bool" />
<description>
@@ -74,13 +68,13 @@
<method name="is_target_reachable">
<return type="bool" />
<description>
- Returns true if the target location is reachable. The target location is set using [method set_target_location].
+ Returns true if [member target_location] is reachable.
</description>
</method>
<method name="is_target_reached" qualifiers="const">
<return type="bool" />
<description>
- Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location].
+ Returns true if [member target_location] is reached. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location].
</description>
</method>
<method name="set_navigation_layer_value">
@@ -98,13 +92,6 @@
Sets the [RID] of the navigation map this NavigationAgent node should use and also updates the [code]agent[/code] on the NavigationServer.
</description>
</method>
- <method name="set_target_location">
- <return type="void" />
- <param index="0" name="location" type="Vector2" />
- <description>
- Sets the user desired final location. This will clear the current navigation path.
- </description>
- </method>
<method name="set_velocity">
<return type="void" />
<param index="0" name="velocity" type="Vector2" />
@@ -142,6 +129,9 @@
<member name="target_desired_distance" type="float" setter="set_target_desired_distance" getter="get_target_desired_distance" default="1.0">
The distance threshold before the final target point is considered to be reached. This will allow an agent to not have to hit the point of the final target exactly, but only the area. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the final target point on each physics frame update.
</member>
+ <member name="target_location" type="Vector2" setter="set_target_location" getter="get_target_location" default="Vector2(0, 0)">
+ The user-defined target location. Setting this property will clear the current navigation path.
+ </member>
<member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="20.0">
The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive.
</member>
@@ -159,11 +149,11 @@
</signal>
<signal name="target_reached">
<description>
- Notifies when the player defined target, set with [method set_target_location], is reached.
+ Notifies when the player-defined [member target_location] is reached.
</description>
</signal>
<signal name="velocity_computed">
- <param index="0" name="safe_velocity" type="Vector3" />
+ <param index="0" name="safe_velocity" type="Vector2" />
<description>
Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity]. Only emitted when [member avoidance_enabled] is true.
</description>
diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml
index 3bb5b361ca..44c17647f7 100644
--- a/doc/classes/NavigationAgent3D.xml
+++ b/doc/classes/NavigationAgent3D.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
3D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. [NavigationAgent3D] is physics safe.
- [b]Note:[/b] After [method set_target_location] is used it is required to use the [method get_next_location] function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node.
+ [b]Note:[/b] After setting [member target_location] it is required to use the [method get_next_location] function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node.
</description>
<tutorials>
</tutorials>
@@ -13,7 +13,7 @@
<method name="distance_to_target" qualifiers="const">
<return type="float" />
<description>
- Returns the distance to the target location, using the agent's global position. The user must set the target location with [method set_target_location] in order for this to be accurate.
+ Returns the distance to the target location, using the agent's global position. The user must set [member target_location] in order for this to be accurate.
</description>
</method>
<method name="get_final_location">
@@ -59,12 +59,6 @@
Returns the [RID] of this agent on the [NavigationServer3D].
</description>
</method>
- <method name="get_target_location" qualifiers="const">
- <return type="Vector3" />
- <description>
- Returns the user defined [Vector3] after setting the target location.
- </description>
- </method>
<method name="is_navigation_finished">
<return type="bool" />
<description>
@@ -74,13 +68,13 @@
<method name="is_target_reachable">
<return type="bool" />
<description>
- Returns true if the target location is reachable. The target location is set using [method set_target_location].
+ Returns true if [member target_location] is reachable.
</description>
</method>
<method name="is_target_reached" qualifiers="const">
<return type="bool" />
<description>
- Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location].
+ Returns true if [member target_location] is reached. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location].
</description>
</method>
<method name="set_navigation_layer_value">
@@ -98,13 +92,6 @@
Sets the [RID] of the navigation map this NavigationAgent node should use and also updates the [code]agent[/code] on the NavigationServer.
</description>
</method>
- <method name="set_target_location">
- <return type="void" />
- <param index="0" name="location" type="Vector3" />
- <description>
- Sets the user desired final location. This will clear the current navigation path.
- </description>
- </method>
<method name="set_velocity">
<return type="void" />
<param index="0" name="velocity" type="Vector3" />
@@ -148,6 +135,9 @@
<member name="target_desired_distance" type="float" setter="set_target_desired_distance" getter="get_target_desired_distance" default="1.0">
The distance threshold before the final target point is considered to be reached. This will allow an agent to not have to hit the point of the final target exactly, but only the area. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the final target point on each physics frame update.
</member>
+ <member name="target_location" type="Vector3" setter="set_target_location" getter="get_target_location" default="Vector3(0, 0, 0)">
+ The user-defined target location. Setting this property will clear the current navigation path.
+ </member>
<member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="5.0">
The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive.
</member>
@@ -165,7 +155,7 @@
</signal>
<signal name="target_reached">
<description>
- Notifies when the player defined target, set with [method set_target_location], is reached.
+ Notifies when the player-defined [member target_location] is reached.
</description>
</signal>
<signal name="velocity_computed">
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index bceb285584..f910112a76 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -39,7 +39,7 @@
<method name="_get_configuration_warnings" qualifiers="virtual const">
<return type="PackedStringArray" />
<description>
- The elements in the array returned from this method are displayed as warnings in the Scene Dock if the script that overrides it is a [code]tool[/code] script.
+ The elements in the array returned from this method are displayed as warnings in the Scene dock if the script that overrides it is a [code]tool[/code] script.
Returning an empty array produces no warnings.
Call [method update_configuration_warnings] when the warnings need to be updated for this node.
</description>
@@ -529,9 +529,9 @@
<method name="move_child">
<return type="void" />
<param index="0" name="child_node" type="Node" />
- <param index="1" name="to_position" type="int" />
+ <param index="1" name="to_index" type="int" />
<description>
- Moves a child node to a different position (order) among the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful. If [param to_position] is negative, the index will be counted from the end.
+ Moves a child node to a different index (order) among the other children. Since calls, signals, etc. are performed by tree order, changing the order of children nodes may be useful. If [param to_index] is negative, the index will be counted from the end.
[b]Note:[/b] Internal children can only be moved within their expected "internal range" (see [code]internal[/code] parameter in [method add_child]).
</description>
</method>
@@ -560,7 +560,7 @@
<method name="print_tree_pretty">
<return type="void" />
<description>
- Similar to [method print_tree], this prints the tree to stdout. This version displays a more graphical representation similar to what is displayed in the scene inspector. It is useful for inspecting larger trees.
+ Similar to [method print_tree], this prints the tree to stdout. This version displays a more graphical representation similar to what is displayed in the Scene Dock. It is useful for inspecting larger trees.
[b]Example output:[/b]
[codeblock]
â”–â•´TheGame
@@ -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">
@@ -630,7 +630,7 @@
<return type="int" enum="Error" />
<param index="0" name="method" type="StringName" />
<description>
- Sends a remote procedure call request for the given [param method] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. Returns [code]null[/code].
+ Sends a remote procedure call request for the given [param method] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behavior depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. Returns [code]null[/code].
[b]Note:[/b] You can only safely use RPCs on clients after you received the [code]connected_to_server[/code] signal from the [MultiplayerAPI]. You also need to keep track of the connection state, either by the [MultiplayerAPI] signals like [code]server_disconnected[/code] or by checking [code]get_multiplayer().peer.get_connection_status() == CONNECTION_CONNECTED[/code].
</description>
</method>
diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml
index 3df7ec931f..b6024b1887 100644
--- a/doc/classes/Node3D.xml
+++ b/doc/classes/Node3D.xml
@@ -290,12 +290,13 @@
<member name="rotation_edit_mode" type="int" setter="set_rotation_edit_mode" getter="get_rotation_edit_mode" enum="Node3D.RotationEditMode" default="0">
Specify how rotation (and scale) will be presented in the editor.
</member>
- <member name="rotation_order" type="int" setter="set_rotation_order" getter="get_rotation_order" enum="Node3D.RotationOrder" default="2">
+ <member name="rotation_order" type="int" setter="set_rotation_order" getter="get_rotation_order" enum="EulerOrder" default="2">
Specify the axis rotation order of the [member rotation] property. The final orientation is constructed by rotating the Euler angles in the order specified by this property.
</member>
<member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3(1, 1, 1)">
Scale part of the local transformation.
[b]Note:[/b] Mixed negative scales in 3D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, the scale values will either be all positive or all negative.
+ [b]Note:[/b] Not all nodes are visually scaled by the [member scale] property. For example, [Light3D]s are not visually affected by [member scale].
</member>
<member name="top_level" type="bool" setter="set_as_top_level" getter="is_set_as_top_level" default="false">
If [code]true[/code], the node will not inherit its transformations from its parent. Node transformations are only in global space.
@@ -341,17 +342,5 @@
</constant>
<constant name="ROTATION_EDIT_MODE_BASIS" value="2" enum="RotationEditMode">
</constant>
- <constant name="ROTATION_ORDER_XYZ" value="0" enum="RotationOrder">
- </constant>
- <constant name="ROTATION_ORDER_XZY" value="1" enum="RotationOrder">
- </constant>
- <constant name="ROTATION_ORDER_YXZ" value="2" enum="RotationOrder">
- </constant>
- <constant name="ROTATION_ORDER_YZX" value="3" enum="RotationOrder">
- </constant>
- <constant name="ROTATION_ORDER_ZXY" value="4" enum="RotationOrder">
- </constant>
- <constant name="ROTATION_ORDER_ZYX" value="5" enum="RotationOrder">
- </constant>
</constants>
</class>
diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml
index 9db100c9f8..022b4826ea 100644
--- a/doc/classes/NodePath.xml
+++ b/doc/classes/NodePath.xml
@@ -4,7 +4,7 @@
Pre-parsed scene tree path.
</brief_description>
<description>
- A pre-parsed relative or absolute path in a scene tree, for use with [method Node.get_node] and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For instance, [code]"Path2D/PathFollow2D/Sprite2D:texture:size"[/code] would refer to the [code]size[/code] property of the [code]texture[/code] resource on the node named [code]"Sprite2D"[/code] which is a child of the other named nodes in the path.
+ A pre-parsed relative or absolute path in a scene tree, for use with [method Node.get_node] and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For example, [code]"Path2D/PathFollow2D/Sprite2D:texture:size"[/code] would refer to the [code]size[/code] property of the [code]texture[/code] resource on the node named [code]"Sprite2D"[/code] which is a child of the other named nodes in the path.
You will usually just pass a string to [method Node.get_node] and it will be automatically converted, but you may occasionally want to parse a path ahead of time with [NodePath] or the literal syntax [code]^"path"[/code]. Exporting a [NodePath] variable will give you a node selection widget in the properties panel of the editor, which can often be useful.
A [NodePath] is composed of a list of slash-separated node names (like a filesystem path) and an optional colon-separated list of "subnames" which can be resources or properties.
Some examples of NodePaths include the following:
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 15b3d4958c..ea9b83d2aa 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -4,7 +4,8 @@
Operating System functions.
</brief_description>
<description>
- Operating System functions. OS wraps the most common functionality to communicate with the host operating system, such as the clipboard, video driver, delays, environment variables, execution of binaries, command line, etc.
+ Operating System functions. [OS] wraps the most common functionality to communicate with the host operating system, such as the clipboard, video driver, delays, environment variables, execution of binaries, command line, etc.
+ [b]Note:[/b] In Godot 4, [OS] functions related to window management were moved to the [DisplayServer] singleton.
</description>
<tutorials>
<link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
@@ -133,7 +134,7 @@
<method name="get_cache_dir" qualifiers="const">
<return type="String" />
<description>
- Returns the [i]global[/i] cache data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CACHE_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_config_dir] and [method get_data_dir].
+ Returns the [i]global[/i] cache data directory according to the operating system's standards. On the Linux/BSD platform, this path can be overridden by setting the [code]XDG_CACHE_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_config_dir] and [method get_data_dir].
Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path.
</description>
</method>
@@ -191,7 +192,7 @@
<method name="get_config_dir" qualifiers="const">
<return type="String" />
<description>
- Returns the [i]global[/i] user configuration directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CONFIG_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_data_dir].
+ Returns the [i]global[/i] user configuration directory according to the operating system's standards. On the Linux/BSD platform, this path can be overridden by setting the [code]XDG_CONFIG_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_data_dir].
Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path.
</description>
</method>
@@ -199,14 +200,14 @@
<return type="PackedStringArray" />
<description>
Returns an array of MIDI device names.
- The returned array will be empty if the system MIDI driver has not previously been initialised with [method open_midi_inputs].
+ The returned array will be empty if the system MIDI driver has not previously been initialized with [method open_midi_inputs].
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
<method name="get_data_dir" qualifiers="const">
<return type="String" />
<description>
- Returns the [i]global[/i] user data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_DATA_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_config_dir].
+ Returns the [i]global[/i] user data directory according to the operating system's standards. On the Linux/BSD platform, this path can be overridden by setting the [code]XDG_DATA_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_config_dir].
Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path.
</description>
</method>
@@ -445,6 +446,15 @@
[b]Note:[/b] This method is not supported on the web platform. It returns an empty string.
</description>
</method>
+ <method name="get_video_adapter_driver_info" qualifiers="const">
+ <return type="PackedStringArray" />
+ <description>
+ Returns the video adapter driver name and version for the user's currently active graphics card.
+ The first element holds the driver name, such as [code]nvidia[/code], [code]amdgpu[/code], etc.
+ The second element holds the driver version. For e.g. the [code]nvidia[/code] driver on a Linux/BSD platform, the version is in the format [code]510.85.02[/code]. For Windows, the driver's format is [code]31.0.15.1659[/code].
+ [b]Note:[/b] This method is only supported on the platforms Linux/BSD and Windows when not running in headless mode. It returns an empty array on other platforms.
+ </description>
+ </method>
<method name="has_environment" qualifiers="const">
<return type="bool" />
<param index="0" name="variable" type="String" />
@@ -457,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>
@@ -616,11 +626,11 @@
</member>
</members>
<constants>
- <constant name="VIDEO_DRIVER_VULKAN" value="0" enum="VideoDriver">
- The Vulkan rendering backend. It requires Vulkan 1.0 support and automatically uses features from Vulkan 1.1 and 1.2 if available.
+ <constant name="RENDERING_DRIVER_VULKAN" value="0" enum="RenderingDriver">
+ The Vulkan rendering driver. It requires Vulkan 1.0 support and automatically uses features from Vulkan 1.1 and 1.2 if available.
</constant>
- <constant name="VIDEO_DRIVER_OPENGL_3" value="1" enum="VideoDriver">
- The OpenGL 3 rendering backend. It uses OpenGL 3.3 Core Profile on desktop platforms, OpenGL ES 3.0 on mobile devices, and WebGL 2.0 on Web.
+ <constant name="RENDERING_DRIVER_OPENGL3" value="1" enum="RenderingDriver">
+ The OpenGL 3 rendering driver. It uses OpenGL 3.3 Core Profile on desktop platforms, OpenGL ES 3.0 on mobile devices, and WebGL 2.0 on Web.
</constant>
<constant name="DAY_SUNDAY" value="0" enum="Weekday">
Sunday.
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 7ad1908bb5..318f2cfade 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -108,7 +108,8 @@
<return type="Variant" />
<param index="0" name="method" type="StringName" />
<description>
- Calls the [param method] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
+ Calls the [param method] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
var node = Node3D.new()
@@ -126,7 +127,8 @@
<return type="Variant" />
<param index="0" name="method" type="StringName" />
<description>
- Calls the [param method] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
+ Calls the [param method] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
var node = Node3D.new()
@@ -318,7 +320,8 @@
<return type="int" enum="Error" />
<param index="0" name="signal" type="StringName" />
<description>
- Emits the given [param signal]. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:
+ Emits the given [param signal]. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
emit_signal("hit", "sword", 100)
@@ -364,9 +367,10 @@
</method>
<method name="get_indexed" qualifiers="const">
<return type="Variant" />
- <param index="0" name="property" type="NodePath" />
+ <param index="0" name="property_path" type="NodePath" />
<description>
- Gets the object's property indexed by the given [NodePath]. The node path should be relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Examples: [code]"position:x"[/code] or [code]"material:next_pass:blend_mode"[/code].
+ Gets the object's property indexed by the given [param property_path]. The path should be a [NodePath] relative to the current object and can use the colon character ([code]:[/code]) to access nested properties.
+ [b]Examples:[/b] [code]"position:x"[/code] or [code]"material:next_pass:blend_mode"[/code].
[b]Note:[/b] Even though the method takes [NodePath] argument, it doesn't support actual paths to [Node]s in the scene tree, only colon-separated sub-property paths. For the purpose of nodes, use [method Node.get_node_and_resource] instead.
</description>
</method>
@@ -384,7 +388,7 @@
<description>
Returns the object's metadata entry for the given [param name].
Throws error if the entry does not exist, unless [param default] is not [code]null[/code] (in which case the default value will be returned). See also [method has_meta], [method set_meta] and [method remove_meta].
- [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the inspector and should not be edited.
+ [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited.
</description>
</method>
<method name="get_meta_list" qualifiers="const">
@@ -430,7 +434,7 @@
<param index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if a metadata entry is found with the given [param name]. See also [method get_meta], [method set_meta] and [method remove_meta].
- [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the inspector and should not be edited.
+ [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited.
</description>
</method>
<method name="has_method" qualifiers="const">
@@ -502,7 +506,7 @@
<param index="0" name="name" type="StringName" />
<description>
Removes a given entry from the object's metadata. See also [method has_meta], [method get_meta] and [method set_meta].
- [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the inspector and should not be edited.
+ [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited.
</description>
</method>
<method name="set">
@@ -532,10 +536,11 @@
</method>
<method name="set_indexed">
<return type="void" />
- <param index="0" name="property" type="NodePath" />
+ <param index="0" name="property_path" type="NodePath" />
<param index="1" name="value" type="Variant" />
<description>
- Assigns a new value to the property identified by the [NodePath]. The node path should be relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Example:
+ Assigns a new value to the property identified by the [param property_path]. The path should be a [NodePath] relative to the current object and can use the colon character ([code]:[/code]) to access nested properties.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
var node = Node2D.new()
@@ -566,7 +571,7 @@
<description>
Adds, changes or removes a given entry in the object's metadata. Metadata are serialized and can take any [Variant] value.
To remove a given entry from the object's metadata, use [method remove_meta]. Metadata is also removed if its value is set to [code]null[/code]. This means you can also use [code]set_meta("name", null)[/code] to remove metadata for [code]"name"[/code]. See also [method has_meta] and [method get_meta].
- [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the inspector and should not be edited.
+ [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited.
</description>
</method>
<method name="set_script">
diff --git a/doc/classes/OccluderInstance3D.xml b/doc/classes/OccluderInstance3D.xml
index 0bebc7ea43..bc16fba500 100644
--- a/doc/classes/OccluderInstance3D.xml
+++ b/doc/classes/OccluderInstance3D.xml
@@ -42,7 +42,7 @@
</member>
<member name="occluder" type="Occluder3D" setter="set_occluder" getter="get_occluder">
The occluder resource for this [OccluderInstance3D]. You can generate an occluder resource by selecting an [OccluderInstance3D] node then using the [b]Bake Occluders[/b] button at the top of the editor.
- You can also draw your own 2D occluder polygon by adding a new [PolygonOccluder3D] resource to the [member occluder] property in the inspector.
+ You can also draw your own 2D occluder polygon by adding a new [PolygonOccluder3D] resource to the [member occluder] property in the Inspector.
Alternatively, you can select a primitive occluder to use: [QuadOccluder3D], [BoxOccluder3D] or [SphereOccluder3D].
</member>
</members>
diff --git a/doc/classes/OmniLight3D.xml b/doc/classes/OmniLight3D.xml
index ce63dbdbc1..193ae8deeb 100644
--- a/doc/classes/OmniLight3D.xml
+++ b/doc/classes/OmniLight3D.xml
@@ -15,6 +15,7 @@
</member>
<member name="omni_range" type="float" setter="set_param" getter="get_param" default="5.0">
The light's radius. Note that the effectively lit area may appear to be smaller depending on the [member omni_attenuation] in use. No matter the [member omni_attenuation] in use, the light will never reach anything outside this radius.
+ [b]Note:[/b] [member omni_range] is not affected by [member Node3D.scale] (the light's scale or its parent's scale).
</member>
<member name="omni_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="OmniLight3D.ShadowMode" default="1">
See [enum ShadowMode].
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index 199535298c..e63e822648 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -216,7 +216,7 @@
<signal name="item_focused">
<param index="0" name="index" type="int" />
<description>
- Emitted when the user navigates to an item using the [code]ui_up[/code] or [code]ui_down[/code] actions. The index of the item selected is passed as argument.
+ Emitted when the user navigates to an item using the [member ProjectSettings.input/ui_up] or [member ProjectSettings.input/ui_down] input actions. The index of the item selected is passed as argument.
</description>
</signal>
<signal name="item_selected">
diff --git a/doc/classes/ParticleProcessMaterial.xml b/doc/classes/ParticleProcessMaterial.xml
index a41207e9b3..d4050e3bd1 100644
--- a/doc/classes/ParticleProcessMaterial.xml
+++ b/doc/classes/ParticleProcessMaterial.xml
@@ -217,7 +217,7 @@
Maximum linear acceleration applied to each particle in the direction of motion.
</member>
<member name="linear_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0">
- Minimum equivalent of [member linear_accel_min].
+ Minimum equivalent of [member linear_accel_max].
</member>
<member name="orbit_velocity_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture">
Each particle's orbital velocity will vary along this [CurveTexture].
@@ -259,6 +259,10 @@
<member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0">
Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees.
</member>
+ <member name="sub_emitter_amount_at_collision" type="int" setter="set_sub_emitter_amount_at_collision" getter="get_sub_emitter_amount_at_collision">
+ Sub particle amount on collision.
+ Maximum amount set in the sub particles emitter.
+ </member>
<member name="sub_emitter_amount_at_end" type="int" setter="set_sub_emitter_amount_at_end" getter="get_sub_emitter_amount_at_end">
</member>
<member name="sub_emitter_frequency" type="float" setter="set_sub_emitter_frequency" getter="get_sub_emitter_frequency">
diff --git a/doc/classes/PhysicsDirectBodyState2D.xml b/doc/classes/PhysicsDirectBodyState2D.xml
index fdc3a44e9d..eca6a1cbc7 100644
--- a/doc/classes/PhysicsDirectBodyState2D.xml
+++ b/doc/classes/PhysicsDirectBodyState2D.xml
@@ -76,6 +76,7 @@
<param index="0" name="torque" type="float" />
<description>
Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
+ [b]Note:[/b] [member inverse_inertia] is required for this to work. To have [member inverse_inertia], an active [CollisionShape2D] must be a child of the node, or you can manually set [member inverse_inertia].
</description>
</method>
<method name="apply_torque_impulse">
@@ -84,6 +85,7 @@
<description>
Applies a rotational impulse to the body without affecting the position.
An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ [b]Note:[/b] [member inverse_inertia] is required for this to work. To have [member inverse_inertia], an active [CollisionShape2D] must be a child of the node, or you can manually set [member inverse_inertia].
</description>
</method>
<method name="get_constant_force" qualifiers="const">
diff --git a/doc/classes/PhysicsDirectBodyState3D.xml b/doc/classes/PhysicsDirectBodyState3D.xml
index 04087cbfb6..a809384642 100644
--- a/doc/classes/PhysicsDirectBodyState3D.xml
+++ b/doc/classes/PhysicsDirectBodyState3D.xml
@@ -76,6 +76,7 @@
<param index="0" name="torque" type="Vector3" />
<description>
Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
+ [b]Note:[/b] [member inverse_inertia] is required for this to work. To have [member inverse_inertia], an active [CollisionShape3D] must be a child of the node, or you can manually set [member inverse_inertia].
</description>
</method>
<method name="apply_torque_impulse">
@@ -84,6 +85,7 @@
<description>
Applies a rotational impulse to the body without affecting the position.
An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ [b]Note:[/b] [member inverse_inertia] is required for this to work. To have [member inverse_inertia], an active [CollisionShape3D] must be a child of the node, or you can manually set [member inverse_inertia].
</description>
</method>
<method name="get_constant_force" qualifiers="const">
diff --git a/doc/classes/PhysicsTestMotionParameters2D.xml b/doc/classes/PhysicsTestMotionParameters2D.xml
index d8f96511dd..5b969ea869 100644
--- a/doc/classes/PhysicsTestMotionParameters2D.xml
+++ b/doc/classes/PhysicsTestMotionParameters2D.xml
@@ -30,7 +30,7 @@
</member>
<member name="recovery_as_collision" type="bool" setter="set_recovery_as_collision_enabled" getter="is_recovery_as_collision_enabled" default="false">
If set to [code]true[/code], any depenetration from the recovery phase is reported as a collision; this is used e.g. by [CharacterBody2D] for improving floor detection during floor snapping.
- If set to [code]false[/code], only collisions resulting from the motion are reported, which is generally the desired behaviour.
+ If set to [code]false[/code], only collisions resulting from the motion are reported, which is generally the desired behavior.
</member>
</members>
</class>
diff --git a/doc/classes/PhysicsTestMotionParameters3D.xml b/doc/classes/PhysicsTestMotionParameters3D.xml
index e8f80ae131..ea9bca6a35 100644
--- a/doc/classes/PhysicsTestMotionParameters3D.xml
+++ b/doc/classes/PhysicsTestMotionParameters3D.xml
@@ -33,7 +33,7 @@
</member>
<member name="recovery_as_collision" type="bool" setter="set_recovery_as_collision_enabled" getter="is_recovery_as_collision_enabled" default="false">
If set to [code]true[/code], any depenetration from the recovery phase is reported as a collision; this is used e.g. by [CharacterBody3D] for improving floor detection during floor snapping.
- If set to [code]false[/code], only collisions resulting from the motion are reported, which is generally the desired behaviour.
+ If set to [code]false[/code], only collisions resulting from the motion are reported, which is generally the desired behavior.
</member>
</members>
</class>
diff --git a/doc/classes/PlaceholderCubemap.xml b/doc/classes/PlaceholderCubemap.xml
index 3617c6ac2c..0892b023a2 100644
--- a/doc/classes/PlaceholderCubemap.xml
+++ b/doc/classes/PlaceholderCubemap.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PlaceholderCubemap" inherits="PlaceholderTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Placeholder class for a cubemap texture.
</brief_description>
<description>
+ This class is used when loading a project that uses a [Cubemap] subclass in 2 conditions:
+ - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly.
+ - When this subclass is missing due to using a different engine version or build (e.g. modules disabled).
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PlaceholderCubemapArray.xml b/doc/classes/PlaceholderCubemapArray.xml
index 1fcf1e7795..c7a7e9154c 100644
--- a/doc/classes/PlaceholderCubemapArray.xml
+++ b/doc/classes/PlaceholderCubemapArray.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PlaceholderCubemapArray" inherits="PlaceholderTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Placeholder class for a cubemap texture array.
</brief_description>
<description>
+ This class is used when loading a project that uses a [CubemapArray] subclass in 2 conditions:
+ - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly.
+ - When this subclass is missing due to using a different engine version or build (e.g. modules disabled).
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PlaceholderMaterial.xml b/doc/classes/PlaceholderMaterial.xml
index c66641d81c..7febdc7a07 100644
--- a/doc/classes/PlaceholderMaterial.xml
+++ b/doc/classes/PlaceholderMaterial.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PlaceholderMaterial" inherits="Material" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Placeholder class for a material.
</brief_description>
<description>
+ This class is used when loading a project that uses a [Material] subclass in 2 conditions:
+ - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly.
+ - When this subclass is missing due to using a different engine version or build (e.g. modules disabled).
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PlaceholderMesh.xml b/doc/classes/PlaceholderMesh.xml
index cc688816b6..8021a57878 100644
--- a/doc/classes/PlaceholderMesh.xml
+++ b/doc/classes/PlaceholderMesh.xml
@@ -1,13 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PlaceholderMesh" inherits="Mesh" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Placeholder class for a mesh.
</brief_description>
<description>
+ This class is used when loading a project that uses a [Mesh] subclass in 2 conditions:
+ - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly.
+ - When this subclass is missing due to using a different engine version or build (e.g. modules disabled).
</description>
<tutorials>
</tutorials>
<members>
<member name="aabb" type="AABB" setter="set_aabb" getter="get_aabb" default="AABB(0, 0, 0, 0, 0, 0)">
+ The smallest [AABB] enclosing this mesh in local space.
</member>
</members>
</class>
diff --git a/doc/classes/PlaceholderTexture2D.xml b/doc/classes/PlaceholderTexture2D.xml
index 76e575265b..c889055e4d 100644
--- a/doc/classes/PlaceholderTexture2D.xml
+++ b/doc/classes/PlaceholderTexture2D.xml
@@ -1,13 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PlaceholderTexture2D" inherits="Texture2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Placeholder class for a 2-dimensional texture.
</brief_description>
<description>
+ This class is used when loading a project that uses a [Texture2D] subclass in 2 conditions:
+ - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly.
+ - When this subclass is missing due to using a different engine version or build (e.g. modules disabled).
</description>
<tutorials>
</tutorials>
<members>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
<member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(1, 1)">
+ The texture's size (in pixels).
</member>
</members>
</class>
diff --git a/doc/classes/PlaceholderTexture2DArray.xml b/doc/classes/PlaceholderTexture2DArray.xml
index a502e5d334..a749e8c039 100644
--- a/doc/classes/PlaceholderTexture2DArray.xml
+++ b/doc/classes/PlaceholderTexture2DArray.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PlaceholderTexture2DArray" inherits="PlaceholderTextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Placeholder class for a 2-dimensional texture array.
</brief_description>
<description>
+ This class is used when loading a project that uses a [Texture2D] subclass in 2 conditions:
+ - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly.
+ - When this subclass is missing due to using a different engine version or build (e.g. modules disabled).
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PlaceholderTexture3D.xml b/doc/classes/PlaceholderTexture3D.xml
index d31e538307..ccd3c94fc2 100644
--- a/doc/classes/PlaceholderTexture3D.xml
+++ b/doc/classes/PlaceholderTexture3D.xml
@@ -1,13 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PlaceholderTexture3D" inherits="Texture3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Placeholder class for a 3-dimensional texture.
</brief_description>
<description>
+ This class is used when loading a project that uses a [Texture3D] subclass in 2 conditions:
+ - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly.
+ - When this subclass is missing due to using a different engine version or build (e.g. modules disabled).
</description>
<tutorials>
</tutorials>
<members>
<member name="size" type="Vector3i" setter="set_size" getter="get_size" default="Vector3i(1, 1, 1)">
+ The texture's size (in pixels).
</member>
</members>
</class>
diff --git a/doc/classes/PlaceholderTextureLayered.xml b/doc/classes/PlaceholderTextureLayered.xml
index 39af08473a..8cc6dd606a 100644
--- a/doc/classes/PlaceholderTextureLayered.xml
+++ b/doc/classes/PlaceholderTextureLayered.xml
@@ -1,15 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="PlaceholderTextureLayered" inherits="TextureLayered" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Placeholder class for a 2-dimensional texture array.
</brief_description>
<description>
+ This class is used when loading a project that uses a [TextureLayered] subclass in 2 conditions:
+ - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly.
+ - When this subclass is missing due to using a different engine version or build (e.g. modules disabled).
</description>
<tutorials>
</tutorials>
<members>
<member name="layers" type="int" setter="set_layers" getter="get_layers" default="1">
+ The number of layers in the texture array.
</member>
<member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i(1, 1)">
+ The size of each texture layer (in pixels).
</member>
</members>
</class>
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index e51e3753fc..fbe8afa8d1 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -119,6 +119,12 @@
Returns [code]true[/code] if this plane and [param to_plane] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
+ <method name="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this plane is finite, by calling [method @GlobalScope.is_finite] on each component.
+ </description>
+ </method>
<method name="is_point_over" qualifiers="const">
<return type="bool" />
<param index="0" name="point" type="Vector3" />
diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml
index 12f8055180..a3fc326351 100644
--- a/doc/classes/Polygon2D.xml
+++ b/doc/classes/Polygon2D.xml
@@ -92,6 +92,7 @@
[b]Note:[/b] This returns a copy of the [PackedVector2Array] rather than a reference.
</member>
<member name="polygons" type="Array" setter="set_polygons" getter="get_polygons" default="[]">
+ The list of polygons, in case more than one is being represented. Every individual polygon is stored as a [PackedInt32Array] where each [int] is an index to a point in [member polygon]. If empty, this property will be ignored, and the resulting single polygon will be composed of all points in [member polygon], using the order they are stored in.
</member>
<member name="skeleton" type="NodePath" setter="set_skeleton" getter="get_skeleton" default="NodePath(&quot;&quot;)">
</member>
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index 23287f4de1..0dcb33ac4c 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -526,13 +526,14 @@
<signal name="id_focused">
<param index="0" name="id" type="int" />
<description>
- Emitted when user navigated to an item of some [param id] using [code]ui_up[/code] or [code]ui_down[/code] action.
+ Emitted when the user navigated to an item of some [param id] using the [member ProjectSettings.input/ui_up] or [member ProjectSettings.input/ui_down] input action.
</description>
</signal>
<signal name="id_pressed">
<param index="0" name="id" type="int" />
<description>
Emitted when an item of some [param id] is pressed or its accelerator is activated.
+ [b]Note:[/b] If [param id] is negative (either explicitly or due to overflow), this will return the corresponding index instead.
</description>
</signal>
<signal name="index_pressed">
diff --git a/doc/classes/PortableCompressedTexture2D.xml b/doc/classes/PortableCompressedTexture2D.xml
index c7e2f2fbdc..b64cda6df5 100644
--- a/doc/classes/PortableCompressedTexture2D.xml
+++ b/doc/classes/PortableCompressedTexture2D.xml
@@ -22,7 +22,7 @@
<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.
- If lossy compression is requested, the quality setting can optionally be provided. This maps to Lossy WEBP compression quality.
+ If lossy compression is requested, the quality setting can optionally be provided. This maps to Lossy WebP compression quality.
</description>
</method>
<method name="get_compression_mode" qualifiers="const">
@@ -58,6 +58,7 @@
When running on the editor, this class will keep the source compressed data in memory. Otherwise, the source compressed data is lost after loading and the resource can't be re saved.
This flag allows to keep the compressed data in memory if you intend it to persist after loading.
</member>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
<member name="size_override" type="Vector2" setter="set_size_override" getter="get_size_override" default="Vector2(0, 0)">
Allow overriding the texture size (for 2D only).
</member>
diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml
index 1b9ecdbfa0..b1c8907d8e 100644
--- a/doc/classes/PrimitiveMesh.xml
+++ b/doc/classes/PrimitiveMesh.xml
@@ -34,15 +34,21 @@
</method>
</methods>
<members>
- <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb">
+ <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>
- <member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces">
+ <member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces" default="false">
If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn.
This gives the same result as using [constant BaseMaterial3D.CULL_FRONT] in [member BaseMaterial3D.cull_mode].
</member>
<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 d8dad89386..fe6f384603 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="&quot;&quot;">
- 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="&quot;&quot;">
@@ -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]&lt;OS user data directory&gt;/&lt;project name&gt;[/code] directory will be used. If [code]false[/code], the project will save user data to [code]&lt;OS user data directory&gt;/Godot/app_userdata/&lt;project name&gt;[/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.).
@@ -251,7 +252,7 @@
Changes to this setting will only be applied upon restarting the application.
</member>
<member name="application/run/disable_stdout" type="bool" setter="" getter="" default="false">
- If [code]true[/code], disables printing to standard output. This is equivalent to starting the editor or project with the [code]--quiet[/code] command line argument. See also [member application/run/disable_stderr].
+ If [code]true[/code], disables printing to standard output. This is equivalent to starting the editor or project with the [code]--quiet[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. See also [member application/run/disable_stderr].
Changes to this setting will only be applied upon restarting the application.
</member>
<member name="application/run/flush_stdout_on_print" type="bool" setter="" getter="" default="false">
@@ -297,7 +298,7 @@
<member name="audio/driver/driver" type="String" setter="" getter="">
Specifies the audio driver to use. This setting is platform-dependent as each platform supports different audio drivers. If left empty, the default audio driver will be used.
The [code]Dummy[/code] audio driver disables all audio playback and recording, which is useful for non-game applications as it reduces CPU usage. It also prevents the engine from appearing as an application playing audio in the OS' audio mixer.
- [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--audio-driver[/code] command line argument.
+ [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--audio-driver[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url].
</member>
<member name="audio/driver/enable_input" type="bool" setter="" getter="" default="false">
If [code]true[/code], microphone input will be allowed. This requires appropriate permissions to be set when exporting to Android or iOS.
@@ -341,6 +342,9 @@
<member name="compression/formats/zstd/window_log_size" type="int" setter="" getter="" default="27">
Largest size limit (in power of 2) allowed when compressing using long-distance matching with Zstandard. Higher values can result in better compression, but will require more memory when compressing and decompressing.
</member>
+ <member name="debug/disable_touch" type="bool" setter="" getter="" default="false">
+ Disable touch input. Only has effect on iOS.
+ </member>
<member name="debug/file_logging/enable_file_logging" type="bool" setter="" getter="" default="false">
If [code]true[/code], logs all output to files.
</member>
@@ -413,6 +417,9 @@
<member name="debug/gdscript/warnings/standalone_ternary" type="int" setter="" getter="" default="1">
When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when calling a ternary expression that has no effect on the surrounding code, such as writing [code]42 if active else 0[/code] as a statement.
</member>
+ <member name="debug/gdscript/warnings/static_called_on_instance" type="int" setter="" getter="" default="1">
+ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when calling a static method from an instance of a class instead of from the class directly.
+ </member>
<member name="debug/gdscript/warnings/treat_warnings_as_errors" type="bool" setter="" getter="" default="false">
If [code]true[/code], all warnings will be reported as if they are errors.
</member>
@@ -477,7 +484,7 @@
Print GPU profile information to standard output every second. This includes how long each frame takes the GPU to render on average, broken down into different steps of the render pipeline, such as CanvasItems, shadows, glow, etc.
</member>
<member name="debug/settings/stdout/verbose_stdout" type="bool" setter="" getter="" default="false">
- Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc. This can also be enabled using the [code]--verbose[/code] or [code]-v[/code] command line argument, even on an exported project. See also [method OS.is_stdout_verbose] and [method @GlobalScope.print_verbose].
+ Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc. This can also be enabled using the [code]--verbose[/code] or [code]-v[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url], even on an exported project. See also [method OS.is_stdout_verbose] and [method @GlobalScope.print_verbose].
</member>
<member name="debug/shapes/collision/contact_color" type="Color" setter="" getter="" default="Color(1, 0.2, 0.1, 0.8)">
Color of the contact points between collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu.
@@ -549,7 +556,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">
@@ -562,11 +569,21 @@
The default screen orientation to use on mobile devices. See [enum DisplayServer.ScreenOrientation] for possible values.
[b]Note:[/b] When set to a portrait orientation, this project setting does not flip the project resolution's width and height automatically. Instead, you have to set [member display/window/size/viewport_width] and [member display/window/size/viewport_height] accordingly.
</member>
+ <member name="display/window/ios/allow_high_refresh_rate" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], iOS devices that support high refresh rate/"ProMotion" will be allowed to render at up to 120 frames per second.
+ </member>
<member name="display/window/ios/hide_home_indicator" type="bool" setter="" getter="" default="true">
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/ios/hide_status_bar" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], the status bar is hidden while the app is running.
+ </member>
+ <member name="display/window/ios/suppress_ui_gesture" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], it will require two swipes to access iOS UI that uses gestures.
+ [b]Note:[/b] This setting has no effect on the home indicator if [code]hide_home_indicator[/code] is [code]true[/code].
+ </member>
<member name="display/window/per_pixel_transparency/allowed" type="bool" setter="" getter="" default="false">
- If [code]true[/code], allows per-pixel transparency for the window background. This affects performance, so leave it on [code]false[/code] unless you need it.
+ If [code]true[/code], allows per-pixel transparency for the window background. This affects performance, so leave it on [code]false[/code] unless you need it. See also [member display/window/size/transparent] and [member rendering/transparent_background].
</member>
<member name="display/window/size/always_on_top" type="bool" setter="" getter="" default="false">
Forces the main window to be always on top.
@@ -591,8 +608,8 @@
[b]Note:[/b] This setting is ignored on iOS.
</member>
<member name="display/window/size/transparent" type="bool" setter="" getter="" default="false">
- Main window background can be transparent.
- [b]Note:[/b] To use transparent splash screen, set [member application/boot_splash/bg_color] to [code]Color(0, 0, 0, 0)[/code].
+ If [code]true[/code], enables a window manager hint that the main window background [i]can[/i] be transparent. This does not make the background actually transparent. For the background to be transparent, the root viewport must also be made transparent by enabling [member rendering/transparent_background].
+ [b]Note:[/b] To use a transparent splash screen, set [member application/boot_splash/bg_color] to [code]Color(0, 0, 0, 0)[/code].
[b]Note:[/b] This setting has no effect if [member display/window/per_pixel_transparency/allowed] is set to [code]false[/code].
</member>
<member name="display/window/size/viewport_height" type="int" setter="" getter="" default="648">
@@ -620,7 +637,7 @@
</member>
<member name="editor/movie_writer/fps" type="int" setter="" getter="" default="60">
The number of frames per second to record in the video when writing a movie. Simulation speed will adjust to always match the specified framerate, which means the engine will appear to run slower at higher [member editor/movie_writer/fps] values. Certain FPS values will require you to adjust [member editor/movie_writer/mix_rate] to prevent audio from desynchronizing over time.
- This can be specified manually on the command line using the [code]--fixed-fps &lt;fps&gt;[/code] command line argument.
+ This can be specified manually on the command line using the [code]--fixed-fps &lt;fps&gt;[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url].
</member>
<member name="editor/movie_writer/mix_rate" type="int" setter="" getter="" default="48000">
The audio mix rate to use in the recorded audio when writing a movie (in Hz). This can be different from [member audio/driver/mix_rate], but this value must be divisible by [member editor/movie_writer/fps] to prevent audio from desynchronizing over time.
@@ -684,7 +701,8 @@
Default value for [member ScrollContainer.scroll_deadzone], which will be used for all [ScrollContainer]s unless overridden.
</member>
<member name="gui/common/swap_cancel_ok" type="bool" setter="" getter="">
- If [code]true[/code], swaps Cancel and OK buttons in dialogs on Windows and UWP to follow interface conventions.
+ If [code]true[/code], swaps [b]Cancel[/b] and [b]OK[/b] buttons in dialogs on Windows and UWP to follow interface conventions. [method DisplayServer.get_swap_cancel_ok] can be used to query whether buttons are swapped at run-time.
+ [b]Note:[/b] This doesn't affect native dialogs such as the ones spawned by [method DisplayServer.dialog_show].
</member>
<member name="gui/common/text_edit_undo_stack_max_size" type="int" setter="" getter="" default="1024">
Maximum undo/redo history size for [TextEdit] fields.
@@ -712,14 +730,14 @@
[b]Note:[/b] This setting does not affect custom [Font]s used within the project.
</member>
<member name="gui/theme/default_font_subpixel_positioning" type="int" setter="" getter="" default="1">
- Default font glyph sub-pixel positioning mode. See [member FontFile.subpixel_positioning].
+ Default font glyph subpixel positioning mode. See [member FontFile.subpixel_positioning].
</member>
<member name="gui/theme/default_theme_scale" type="float" setter="" getter="" default="1.0">
- The default scale factor for [Control]s, when not overriden by a [Theme].
+ The default scale factor for [Control]s, when not overridden by a [Theme].
[b]Note:[/b] This property is only read when the project starts. To change the default scale at runtime, set [member ThemeDB.fallback_base_scale] instead.
</member>
<member name="gui/theme/lcd_subpixel_layout" type="int" setter="" getter="" default="1">
- LCD sub-pixel layout used for font anti-aliasing. See [enum TextServer.FontLCDSubpixelLayout].
+ LCD subpixel layout used for font anti-aliasing. See [enum TextServer.FontLCDSubpixelLayout].
</member>
<member name="gui/timers/incremental_search_max_interval_msec" type="int" setter="" getter="" default="2000">
Timer setting for incremental search in [Tree], [ItemList], etc. controls (in milliseconds).
@@ -820,6 +838,13 @@
</member>
<member name="input/ui_swap_input_direction" type="Dictionary" setter="" getter="">
</member>
+ <member name="input/ui_text_add_selection_for_next_occurrence" type="Dictionary" setter="" getter="">
+ If a selection is currently active with the last caret in text fields, searches for the next occurrence of the selection, adds a caret and selects the next occurrence.
+ If no selection is currently active with the last caret in text fields, selects the word currently under the caret.
+ The action can be performed sequentially for all occurrences of the selection of the last caret and for all existing carets.
+ The viewport is adjusted to the latest newly added caret.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
+ </member>
<member name="input/ui_text_backspace" type="Dictionary" setter="" getter="">
Default [InputEventAction] to delete the character before the text cursor.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
@@ -838,6 +863,18 @@
<member name="input/ui_text_backspace_word.macos" type="Dictionary" setter="" getter="">
macOS specific override for the shortcut to delete a word.
</member>
+ <member name="input/ui_text_caret_add_above" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to add an additional caret above every caret of a text
+ </member>
+ <member name="input/ui_text_caret_add_above.macos" type="Dictionary" setter="" getter="">
+ macOS specific override for the shortcut to add a caret above every caret
+ </member>
+ <member name="input/ui_text_caret_add_below" type="Dictionary" setter="" getter="">
+ Default [InputEventAction] to add an additional caret below every caret of a text
+ </member>
+ <member name="input/ui_text_caret_add_below.macos" type="Dictionary" setter="" getter="">
+ macOS specific override for the shortcut to add a caret below every caret
+ </member>
<member name="input/ui_text_caret_document_end" type="Dictionary" setter="" getter="">
Default [InputEventAction] to move the text cursor the the end of the text.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
@@ -904,6 +941,11 @@
<member name="input/ui_text_caret_word_right.macos" type="Dictionary" setter="" getter="">
macOS specific override for the shortcut to move the text cursor forward one word.
</member>
+ <member name="input/ui_text_clear_carets_and_selection" type="Dictionary" setter="" getter="">
+ If there's only one caret active and with a selection, clears the selection.
+ In case there's more than one caret active, removes the secondary carets and clears their selections.
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
+ </member>
<member name="input/ui_text_completion_accept" type="Dictionary" setter="" getter="">
Default [InputEventAction] to accept an autocompetion hint.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
@@ -974,14 +1016,14 @@
</member>
<member name="input/ui_text_select_word_under_caret" type="Dictionary" setter="" getter="">
If no selection is currently active, selects the word currently under the caret in text fields. If a selection is currently active, deselects the current selection.
- [b]Note:[/b] Currently, this is only implemented in [TextEdit], not [LineEdit].
+ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_submit" type="Dictionary" setter="" getter="">
Default [InputEventAction] to submit a text field.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_text_toggle_insert_mode" type="Dictionary" setter="" getter="">
- Default [InputEventAction] to toggle [i]instert mode[/i] in a text field. While in insert mode, inserting new text overrides the character after the cursor, unless the next character is a new line.
+ Default [InputEventAction] to toggle [i]insert mode[/i] in a text field. While in insert mode, inserting new text overrides the character after the cursor, unless the next character is a new line.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
<member name="input/ui_undo" type="Dictionary" setter="" getter="">
@@ -1000,7 +1042,7 @@
</member>
<member name="input_devices/pen_tablet/driver" type="String" setter="" getter="">
Specifies the tablet driver to use. If left empty, the default driver will be used.
- [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--tablet-driver[/code] command line argument.
+ [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--tablet-driver[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url].
</member>
<member name="input_devices/pen_tablet/driver.windows" type="String" setter="" getter="">
Override for [member input_devices/pen_tablet/driver] on Windows.
@@ -1065,8 +1107,8 @@
<member name="internationalization/rendering/text_driver" type="String" setter="" getter="" default="&quot;&quot;">
Specifies the [TextServer] to use. If left empty, the default will be used.
"ICU / HarfBuzz / Graphite" is the most advanced text driver, supporting right-to-left typesetting and complex scripts (for languages like Arabic, Hebrew, etc). The "Fallback" text driver does not support right-to-left typesetting and complex scripts.
- [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--text-driver[/code] command line argument.
- [b]Note:[/b] There is an additional [code]Dummy[/code] text driver available, which disables all text rendering and font-related functionality. This driver is not listed in the project settings, but it can be enabled when running the editor or project using the [code]--text-driver Dummy[/code] command line argument.
+ [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--text-driver[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url].
+ [b]Note:[/b] There is an additional [code]Dummy[/code] text driver available, which disables all text rendering and font-related functionality. This driver is not listed in the project settings, but it can be enabled when running the editor or project using the [code]--text-driver Dummy[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url].
</member>
<member name="layer_names/2d_navigation/layer_1" type="String" setter="" getter="" default="&quot;&quot;">
Optional name for the 2D navigation layer 1. If left empty, the layer will display as "Layer 1".
@@ -1805,7 +1847,9 @@
Another way to combat specular aliasing is to enable [member rendering/anti_aliasing/screen_space_roughness_limiter/enabled].
</member>
<member name="rendering/anti_aliasing/quality/use_debanding" type="bool" setter="" getter="" default="false">
- If [code]true[/code], uses a fast post-processing dithering filter on the default screen [Viewport] to make banding significantly less visible. In some cases, the dithering pattern may be slightly noticable. Note that this will make losslessly compressed (PNG etc.) screenshots larger.
+ If [code]true[/code], uses a fast post-processing filter to make banding significantly less visible in 3D. 2D rendering is [i]not[/i] affected by debanding unless the [member Environment.background_mode] is [constant Environment.BG_CANVAS].
+ In some cases, debanding may introduce a slightly noticeable dithering pattern. It's recommended to enable debanding only when actually needed since the dithering pattern will make lossless-compressed screenshots larger.
+ [b]Note:[/b] This property is only read when the project starts. To set debanding at run-time, set [member Viewport.use_debanding] on the root [Viewport] instead.
</member>
<member name="rendering/anti_aliasing/quality/use_taa" type="bool" setter="" getter="" default="false">
Enables Temporal Anti-Aliasing for the default screen [Viewport]. TAA works by jittering the camera and accumulating the images of the last rendered frames, motion vector rendering is used to account for camera and object motion. Enabling TAA can make the image blurrier, which is partially counteracted by automatically using a negative mipmap LOD bias (see [member rendering/textures/default_filters/texture_mipmap_bias]).
@@ -1855,7 +1899,7 @@
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>
<member name="rendering/environment/ssao/adaptive_target" type="float" setter="" getter="" default="0.5">
- Quality target to use when [member rendering/environment/ssao/quality] is set to [code]ULTRA[/code]. A value of [code]0.0[/code] provides a quality and speed similar to [code]MEDIUM[/code] while a value of [code]1.0[/code] provides much higher quality than any of the other settings at the cost of performance.
+ Quality target to use when [member rendering/environment/ssao/quality] is set to [code]Ultra[/code]. A value of [code]0.0[/code] provides a quality and speed similar to [code]Medium[/code] while a value of [code]1.0[/code] provides much higher quality than any of the other settings at the cost of performance.
</member>
<member name="rendering/environment/ssao/blur_passes" type="int" setter="" getter="" default="2">
Number of blur passes to use when computing screen-space ambient occlusion. A higher number will result in a smoother look, but will be slower to compute and will have less high-frequency detail.
@@ -1870,10 +1914,10 @@
If [code]true[/code], screen-space ambient occlusion will be rendered at half size and then upscaled before being added to the scene. This is significantly faster but may miss small details. If [code]false[/code], screen-space ambient occlusion will be rendered at full size.
</member>
<member name="rendering/environment/ssao/quality" type="int" setter="" getter="" default="2">
- Sets the quality of the screen-space ambient occlusion effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to [code]ULTRA[/code] will use the [member rendering/environment/ssao/adaptive_target] setting.
+ Sets the quality of the screen-space ambient occlusion effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to [code]Ultra[/code] will use the [member rendering/environment/ssao/adaptive_target] setting.
</member>
<member name="rendering/environment/ssil/adaptive_target" type="float" setter="" getter="" default="0.5">
- Quality target to use when [member rendering/environment/ssil/quality] is set to [code]ULTRA[/code]. A value of [code]0.0[/code] provides a quality and speed similar to [code]MEDIUM[/code] while a value of [code]1.0[/code] provides much higher quality than any of the other settings at the cost of performance. When using the adaptive target, the performance cost scales with the complexity of the scene.
+ Quality target to use when [member rendering/environment/ssil/quality] is set to [code]Ultra[/code]. A value of [code]0.0[/code] provides a quality and speed similar to [code]Medium[/code] while a value of [code]1.0[/code] provides much higher quality than any of the other settings at the cost of performance. When using the adaptive target, the performance cost scales with the complexity of the scene.
</member>
<member name="rendering/environment/ssil/blur_passes" type="int" setter="" getter="" default="4">
Number of blur passes to use when computing screen-space indirect lighting. A higher number will result in a smoother look, but will be slower to compute and will have less high-frequency detail.
@@ -1888,7 +1932,7 @@
If [code]true[/code], screen-space indirect lighting will be rendered at half size and then upscaled before being added to the scene. This is significantly faster but may miss small details and may result in some objects appearing to glow at their edges.
</member>
<member name="rendering/environment/ssil/quality" type="int" setter="" getter="" default="2">
- Sets the quality of the screen-space indirect lighting effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to [code]ULTRA[/code] will use the [member rendering/environment/ssil/adaptive_target] setting.
+ Sets the quality of the screen-space indirect lighting effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to [code]Ultra[/code] will use the [member rendering/environment/ssil/adaptive_target] setting.
</member>
<member name="rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale" type="float" setter="" getter="" default="0.01">
Scales the depth over which the subsurface scattering effect is applied. A high value may allow light to scatter into a part of the mesh or another mesh that is close in screen space but far in depth.
@@ -1977,6 +2021,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>
@@ -2104,8 +2151,6 @@
<member name="rendering/renderer/rendering_method.web" type="String" setter="" getter="" default="&quot;gl_compatibility&quot;">
Override for [member rendering/renderer/rendering_method] on web.
</member>
- <member name="rendering/rendering_device/descriptor_pools/max_descriptors_per_pool" type="int" setter="" getter="" default="64">
- </member>
<member name="rendering/rendering_device/driver" type="String" setter="" getter="" default="&quot;vulkan&quot;">
Sets the driver to be used by the renderer when using a RenderingDevice-based renderer like the clustered renderer or the mobile renderer. This property can not be edited directly, instead, set the driver using the platform-specific overrides.
</member>
@@ -2130,6 +2175,8 @@
</member>
<member name="rendering/rendering_device/staging_buffer/texture_upload_region_size_px" type="int" setter="" getter="" default="64">
</member>
+ <member name="rendering/rendering_device/vulkan/max_descriptors_per_pool" type="int" setter="" getter="" default="64">
+ </member>
<member name="rendering/scaling_3d/fsr_sharpness" type="float" setter="" getter="" default="0.2">
Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference.
</member>
@@ -2206,6 +2253,9 @@
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/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>
<member name="rendering/vrs/mode" type="int" setter="" getter="" default="0">
Set the default Variable Rate Shading (VRS) mode for the main viewport. See [member Viewport.vrs_mode] to change this at runtime, and [enum Viewport.VRSMode] for possible values.
</member>
@@ -2222,7 +2272,7 @@
Action map configuration to load by default.
</member>
<member name="xr/openxr/enabled" type="bool" setter="" getter="" default="false">
- If [code]true[/code] Godot will setup and initialise OpenXR on startup.
+ If [code]true[/code] Godot will setup and initialize OpenXR on startup.
</member>
<member name="xr/openxr/form_factor" type="int" setter="" getter="" default="&quot;0&quot;">
Specify whether OpenXR should be configured for an HMD or a hand held device.
diff --git a/doc/classes/Projection.xml b/doc/classes/Projection.xml
index 5690ea5e95..602833bca5 100644
--- a/doc/classes/Projection.xml
+++ b/doc/classes/Projection.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Projection" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ 3D projection (4x4 matrix).
</brief_description>
<description>
+ A 4x4 matrix used for 3D projective transformations. It can represent transformations such as translation, rotation, scaling, shearing, and perspective division. It consists of four [Vector4] columns.
+ For purely linear transformations (translation, rotation, and scale), it is recommended to use [Transform3D], as it is more performant and has a lower memory footprint.
+ Used internally as [Camera3D]'s projection matrix.
</description>
<tutorials>
</tutorials>
@@ -10,18 +14,21 @@
<constructor name="Projection">
<return type="Projection" />
<description>
+ Constructs a default-initialized [Projection] set to [constant IDENTITY].
</description>
</constructor>
<constructor name="Projection">
<return type="Projection" />
<param index="0" name="from" type="Projection" />
<description>
+ Constructs a [Projection] as a copy of the given [Projection].
</description>
</constructor>
<constructor name="Projection">
<return type="Projection" />
<param index="0" name="from" type="Transform3D" />
<description>
+ Constructs a Projection as a copy of the given [Transform3D].
</description>
</constructor>
<constructor name="Projection">
@@ -40,12 +47,14 @@
<return type="Projection" />
<param index="0" name="flip_y" type="bool" />
<description>
+ Creates a new [Projection] that projects positions from a depth range of [code]-1[/code] to [code]1[/code] to one that ranges from [code]0[/code] to [code]1[/code], and flips the projected positions vertically, according to [param flip_y].
</description>
</method>
<method name="create_fit_aabb" qualifiers="static">
<return type="Projection" />
<param index="0" name="aabb" type="AABB" />
<description>
+ Creates a new [Projection] that scales a given projection to fit around a given [AABB] in projection space.
</description>
</method>
<method name="create_for_hmd" qualifiers="static">
@@ -59,6 +68,8 @@
<param index="6" name="z_near" type="float" />
<param index="7" name="z_far" type="float" />
<description>
+ Creates a new [Projection] for projecting positions onto a head-mounted display with the given X:Y aspect ratio, distance between eyes, display width, distance to lens, oversampling factor, and depth clipping planes.
+ [param eye] creates the projection for the left eye when set to 1, or the right eye when set to 2.
</description>
</method>
<method name="create_frustum" qualifiers="static">
@@ -70,6 +81,7 @@
<param index="4" name="z_near" type="float" />
<param index="5" name="z_far" type="float" />
<description>
+ Creates a new [Projection] that projects positions in a frustum with the given clipping planes.
</description>
</method>
<method name="create_frustum_aspect" qualifiers="static">
@@ -81,12 +93,15 @@
<param index="4" name="z_far" type="float" />
<param index="5" name="flip_fov" type="bool" default="false" />
<description>
+ Creates a new [Projection] that projects positions in a frustum with the given size, X:Y aspect ratio, offset, and clipping planes.
+ [param flip_fov] determines whether the projection's field of view is flipped over its diagonal.
</description>
</method>
<method name="create_light_atlas_rect" qualifiers="static">
<return type="Projection" />
<param index="0" name="rect" type="Rect2" />
<description>
+ Creates a new [Projection] that projects positions into the given [Rect2].
</description>
</method>
<method name="create_orthogonal" qualifiers="static">
@@ -98,6 +113,7 @@
<param index="4" name="z_near" type="float" />
<param index="5" name="z_far" type="float" />
<description>
+ Creates a new [Projection] that projects positions using an orthogonal projection with the given clipping planes.
</description>
</method>
<method name="create_orthogonal_aspect" qualifiers="static">
@@ -108,6 +124,8 @@
<param index="3" name="z_far" type="float" />
<param index="4" name="flip_fov" type="bool" default="false" />
<description>
+ Creates a new [Projection] that projects positions using an orthogonal projection with the given size, X:Y aspect ratio, and clipping planes.
+ [param flip_fov] determines whether the projection's field of view is flipped over its diagonal.
</description>
</method>
<method name="create_perspective" qualifiers="static">
@@ -118,6 +136,8 @@
<param index="3" name="z_far" type="float" />
<param index="4" name="flip_fov" type="bool" default="false" />
<description>
+ Creates a new [Projection] that projects positions using a perspective projection with the given Y-axis field of view (in degrees), X:Y aspect ratio, and clipping planes.
+ [param flip_fov] determines whether the projection's field of view is flipped over its diagonal.
</description>
</method>
<method name="create_perspective_hmd" qualifiers="static">
@@ -131,31 +151,40 @@
<param index="6" name="intraocular_dist" type="float" />
<param index="7" name=" convergence_dist" type="float" />
<description>
+ Creates a new [Projection] that projects positions using a perspective projection with the given Y-axis field of view (in degrees), X:Y aspect ratio, and clipping distances. The projection is adjusted for a head-mounted display with the given distance between eyes and distance to a point that can be focused on.
+ [param eye] creates the projection for the left eye when set to 1, or the right eye when set to 2.
+ [param flip_fov] determines whether the projection's field of view is flipped over its diagonal.
</description>
</method>
<method name="determinant" qualifiers="const">
<return type="float" />
<description>
+ Returns a scalar value that is the signed factor by which areas are scaled by this matrix. If the sign is negative, the matrix flips the orientation of the area.
+ The determinant can be used to calculate the invertibility of a matrix or solve linear systems of equations involving the matrix, among other applications.
</description>
</method>
<method name="flipped_y" qualifiers="const">
<return type="Projection" />
<description>
+ Returns a copy of this [Projection] with the signs of the values of the Y column flipped.
</description>
</method>
<method name="get_aspect" qualifiers="const">
<return type="float" />
<description>
+ Returns the X:Y aspect ratio of this [Projection]'s viewport.
</description>
</method>
<method name="get_far_plane_half_extents" qualifiers="const">
<return type="Vector2" />
<description>
+ Returns the dimensions of the far clipping plane of the projection, divided by two.
</description>
</method>
<method name="get_fov" qualifiers="const">
<return type="float" />
<description>
+ Returns the horizontal field of view of the projection (in degrees).
</description>
</method>
<method name="get_fovy" qualifiers="static">
@@ -163,89 +192,114 @@
<param index="0" name="fovx" type="float" />
<param index="1" name="aspect" type="float" />
<description>
+ Returns the vertical field of view of the projection (in degrees) associated with the given horizontal field of view (in degrees) and aspect ratio.
</description>
</method>
<method name="get_lod_multiplier" qualifiers="const">
<return type="float" />
<description>
+ Returns the factor by which the visible level of detail is scaled by this [Projection].
</description>
</method>
<method name="get_pixels_per_meter" qualifiers="const">
<return type="int" />
<param index="0" name="for_pixel_width" type="int" />
<description>
+ Returns the number of pixels with the given pixel width displayed per meter, after this [Projection] is applied.
</description>
</method>
<method name="get_projection_plane" qualifiers="const">
<return type="Plane" />
<param index="0" name="plane" type="int" />
<description>
+ Returns the clipping plane of this [Projection] whose index is given by [param plane].
+ [param plane] should be equal to one of [constant PLANE_NEAR], [constant PLANE_FAR], [constant PLANE_LEFT], [constant PLANE_TOP], [constant PLANE_RIGHT], or [constant PLANE_BOTTOM].
</description>
</method>
<method name="get_viewport_half_extents" qualifiers="const">
<return type="Vector2" />
<description>
+ Returns the dimensions of the viewport plane that this [Projection] projects positions onto, divided by two.
</description>
</method>
<method name="get_z_far" qualifiers="const">
<return type="float" />
<description>
+ Returns the distance for this [Projection] beyond which positions are clipped.
</description>
</method>
<method name="get_z_near" qualifiers="const">
<return type="float" />
<description>
+ Returns the distance for this [Projection] before which positions are clipped.
</description>
</method>
<method name="inverse" qualifiers="const">
<return type="Projection" />
<description>
+ Returns a [Projection] that performs the inverse of this [Projection]'s projective transformation.
</description>
</method>
<method name="is_orthogonal" qualifiers="const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if this [Projection] performs an orthogonal projection.
</description>
</method>
<method name="jitter_offseted" qualifiers="const">
<return type="Projection" />
<param index="0" name="offset" type="Vector2" />
<description>
+ Returns a [Projection] with the X and Y values from the given [Vector2] added to the first and second values of the final column respectively.
</description>
</method>
<method name="perspective_znear_adjusted" qualifiers="const">
<return type="Projection" />
<param index="0" name="new_znear" type="float" />
<description>
+ Returns a [Projection] with the near clipping distance adjusted to be [param new_znear].
+ [b]Note:[/b] The original [Projection] must be a perspective projection.
</description>
</method>
</methods>
<members>
<member name="w" type="Vector4" setter="" getter="" default="Vector4(0, 0, 0, 1)">
+ The projection matrix's W vector (column 3). Equivalent to array index [code]3[/code].
</member>
<member name="x" type="Vector4" setter="" getter="" default="Vector4(1, 0, 0, 0)">
+ The projection matrix's X vector (column 0). Equivalent to array index [code]0[/code].
</member>
<member name="y" type="Vector4" setter="" getter="" default="Vector4(0, 1, 0, 0)">
+ The projection matrix's Y vector (column 1). Equivalent to array index [code]1[/code].
</member>
<member name="z" type="Vector4" setter="" getter="" default="Vector4(0, 0, 1, 0)">
+ The projection matrix's Z vector (column 2). Equivalent to array index [code]2[/code].
</member>
</members>
<constants>
<constant name="PLANE_NEAR" value="0">
+ The index value of the projection's near clipping plane.
</constant>
<constant name="PLANE_FAR" value="1">
+ The index value of the projection's far clipping plane.
</constant>
<constant name="PLANE_LEFT" value="2">
+ The index value of the projection's left clipping plane.
</constant>
<constant name="PLANE_TOP" value="3">
+ The index value of the projection's top clipping plane.
</constant>
<constant name="PLANE_RIGHT" value="4">
+ The index value of the projection's right clipping plane.
</constant>
<constant name="PLANE_BOTTOM" value="5">
+ The index value of the projection bottom clipping plane.
</constant>
<constant name="IDENTITY" value="Projection(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)">
+ A [Projection] with no transformation defined. When applied to other data structures, no transformation is performed.
</constant>
<constant name="ZERO" value="Projection(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)">
+ A [Projection] with all values initialized to 0. When applied to other data structures, they will be zeroed.
</constant>
</constants>
<operators>
@@ -253,30 +307,38 @@
<return type="bool" />
<param index="0" name="right" type="Projection" />
<description>
+ Returns [code]true[/code] if the projections are not equal.
+ [b]Note:[/b] Due to floating-point precision errors, this may return [code]true[/code], even if the projections are virtually equal. An [code]is_equal_approx[/code] method may be added in a future version of Godot.
</description>
</operator>
<operator name="operator *">
<return type="Projection" />
<param index="0" name="right" type="Projection" />
<description>
+ Returns a [Projection] that applies the combined transformations of this [Projection] and [param right].
</description>
</operator>
<operator name="operator *">
<return type="Vector4" />
<param index="0" name="right" type="Vector4" />
<description>
+ Projects (multiplies) the given [Vector4] by this [Projection] matrix.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
<param index="0" name="right" type="Projection" />
<description>
+ Returns [code]true[/code] if the projections are equal.
+ [b]Note:[/b] Due to floating-point precision errors, this may return [code]false[/code], even if the projections are virtually equal. An [code]is_equal_approx[/code] method may be added in a future version of Godot.
</description>
</operator>
<operator name="operator []">
<return type="Vector4" />
<param index="0" name="index" type="int" />
<description>
+ Returns the column of the [Projection] with the given index.
+ Indices are in the following order: x, y, z, w.
</description>
</operator>
</operators>
diff --git a/doc/classes/PropertyTweener.xml b/doc/classes/PropertyTweener.xml
index 75d9c919aa..61e8357809 100644
--- a/doc/classes/PropertyTweener.xml
+++ b/doc/classes/PropertyTweener.xml
@@ -13,7 +13,8 @@
<method name="as_relative">
<return type="PropertyTweener" />
<description>
- When called, the final value will be used as a relative value instead. Example:
+ When called, the final value will be used as a relative value instead.
+ [b]Example:[/b]
[codeblock]
var tween = get_tree().create_tween()
tween.tween_property(self, "position", Vector2.RIGHT * 100, 1).as_relative() #the node will move by 100 pixels to the right
@@ -24,10 +25,11 @@
<return type="PropertyTweener" />
<param index="0" name="value" type="Variant" />
<description>
- Sets a custom initial value to the [PropertyTweener]. Example:
+ Sets a custom initial value to the [PropertyTweener].
+ [b]Example:[/b]
[codeblock]
var tween = get_tree().create_tween()
- tween.tween_property(self, "position", Vector2(200, 100), 1).from(Vector2(100, 100) #this will move the node from position (100, 100) to (200, 100)
+ tween.tween_property(self, "position", Vector2(200, 100), 1).from(Vector2(100, 100)) #this will move the node from position (100, 100) to (200, 100)
[/codeblock]
</description>
</method>
diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml
index f21ebf57e2..ac2eda9f28 100644
--- a/doc/classes/Quaternion.xml
+++ b/doc/classes/Quaternion.xml
@@ -43,12 +43,6 @@
</constructor>
<constructor name="Quaternion">
<return type="Quaternion" />
- <param index="0" name="euler_yxz" type="Vector3" />
- <description>
- </description>
- </constructor>
- <constructor name="Quaternion">
- <return type="Quaternion" />
<param index="0" name="from" type="Basis" />
<description>
Constructs a quaternion from the given [Basis].
@@ -86,6 +80,13 @@
<description>
</description>
</method>
+ <method name="from_euler" qualifiers="static">
+ <return type="Quaternion" />
+ <param index="0" name="euler" type="Vector3" />
+ <description>
+ Constructs a Quaternion from Euler angles in YXZ rotation order.
+ </description>
+ </method>
<method name="get_angle" qualifiers="const">
<return type="float" />
<description>
@@ -98,8 +99,9 @@
</method>
<method name="get_euler" qualifiers="const">
<return type="Vector3" />
+ <param index="0" name="order" type="int" default="2" />
<description>
- Returns Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last) corresponding to the rotation represented by the unit quaternion. Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle).
+ Returns the quaternion's rotation in the form of Euler angles. The Euler order depends on the [param order] parameter, for example using the YXZ convention: since this method decomposes, first Z, then X, and Y last. See the [enum EulerOrder] enum for possible values. The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle).
</description>
</method>
<method name="inverse" qualifiers="const">
@@ -115,6 +117,12 @@
Returns [code]true[/code] if this quaternion and [param to] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
+ <method name="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this quaternion is finite, by calling [method @GlobalScope.is_finite] on each component.
+ </description>
+ </method>
<method name="is_normalized" qualifiers="const">
<return type="bool" />
<description>
diff --git a/doc/classes/RDPipelineRasterizationState.xml b/doc/classes/RDPipelineRasterizationState.xml
index 39a64c730a..48599b6262 100644
--- a/doc/classes/RDPipelineRasterizationState.xml
+++ b/doc/classes/RDPipelineRasterizationState.xml
@@ -13,7 +13,7 @@
</member>
<member name="depth_bias_constant_factor" type="float" setter="set_depth_bias_constant_factor" getter="get_depth_bias_constant_factor" default="0.0">
</member>
- <member name="depth_bias_enable" type="bool" setter="set_depth_bias_enable" getter="get_depth_bias_enable" default="false">
+ <member name="depth_bias_enabled" type="bool" setter="set_depth_bias_enabled" getter="get_depth_bias_enabled" default="false">
</member>
<member name="depth_bias_slope_factor" type="float" setter="set_depth_bias_slope_factor" getter="get_depth_bias_slope_factor" default="0.0">
</member>
diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml
index b8a290381f..a6254788ce 100644
--- a/doc/classes/RandomNumberGenerator.xml
+++ b/doc/classes/RandomNumberGenerator.xml
@@ -10,10 +10,9 @@
[codeblock]
var rng = RandomNumberGenerator.new()
func _ready():
- rng.randomize()
var my_random_number = rng.randf_range(-10.0, 10.0)
[/codeblock]
- [b]Note:[/b] The default values of [member seed] and [member state] properties are pseudo-random, and changes when calling [method randomize]. The [code]0[/code] value documented here is a placeholder, and not the actual default seed.
+ [b]Note:[/b] The default values of [member seed] and [member state] properties are pseudo-random, and change when calling [method randomize]. The [code]0[/code] value documented here is a placeholder, and not the actual default seed.
</description>
<tutorials>
<link title="Random number generation">$DOCS_URL/tutorials/math/random_number_generation.html</link>
diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml
index 16e6e86f9e..2dcfc90955 100644
--- a/doc/classes/Range.xml
+++ b/doc/classes/Range.xml
@@ -16,6 +16,13 @@
Called when the [Range]'s value is changed (following the same conditions as [signal value_changed]).
</description>
</method>
+ <method name="set_value_no_signal">
+ <return type="void" />
+ <param index="0" name="value" type="float" />
+ <description>
+ Sets the [Range]'s current value to the specified [param value], without emitting the [signal value_changed] signal.
+ </description>
+ </method>
<method name="share">
<return type="void" />
<param index="0" name="with" type="Node" />
@@ -31,35 +38,36 @@
</method>
</methods>
<members>
- <member name="allow_greater" type="bool" setter="set_allow_greater" getter="is_greater_allowed">
+ <member name="allow_greater" type="bool" setter="set_allow_greater" getter="is_greater_allowed" default="false">
If [code]true[/code], [member value] may be greater than [member max_value].
</member>
- <member name="allow_lesser" type="bool" setter="set_allow_lesser" getter="is_lesser_allowed">
+ <member name="allow_lesser" type="bool" setter="set_allow_lesser" getter="is_lesser_allowed" default="false">
If [code]true[/code], [member value] may be less than [member min_value].
</member>
- <member name="exp_edit" type="bool" setter="set_exp_ratio" getter="is_ratio_exp">
+ <member name="exp_edit" type="bool" setter="set_exp_ratio" getter="is_ratio_exp" default="false">
If [code]true[/code], and [code]min_value[/code] is greater than 0, [code]value[/code] will be represented exponentially rather than linearly.
</member>
- <member name="max_value" type="float" setter="set_max" getter="get_max">
+ <member name="max_value" type="float" setter="set_max" getter="get_max" default="100.0">
Maximum value. Range is clamped if [code]value[/code] is greater than [code]max_value[/code].
</member>
- <member name="min_value" type="float" setter="set_min" getter="get_min">
+ <member name="min_value" type="float" setter="set_min" getter="get_min" default="0.0">
Minimum value. Range is clamped if [code]value[/code] is less than [code]min_value[/code].
</member>
- <member name="page" type="float" setter="set_page" getter="get_page">
+ <member name="page" type="float" setter="set_page" getter="get_page" default="0.0">
Page size. Used mainly for [ScrollBar]. ScrollBar's length is its size multiplied by [code]page[/code] over the difference between [code]min_value[/code] and [code]max_value[/code].
</member>
<member name="ratio" type="float" setter="set_as_ratio" getter="get_as_ratio">
The value mapped between 0 and 1.
</member>
- <member name="rounded" type="bool" setter="set_use_rounded_values" getter="is_using_rounded_values">
+ <member name="rounded" type="bool" setter="set_use_rounded_values" getter="is_using_rounded_values" default="false">
If [code]true[/code], [code]value[/code] will always be rounded to the nearest integer.
</member>
- <member name="step" type="float" setter="set_step" getter="get_step">
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="0" />
+ <member name="step" type="float" setter="set_step" getter="get_step" default="0.01">
If greater than 0, [code]value[/code] will always be rounded to a multiple of [code]step[/code]. If [code]rounded[/code] is also [code]true[/code], [code]value[/code] will first be rounded to a multiple of [code]step[/code] then rounded to the nearest integer.
</member>
- <member name="value" type="float" setter="set_value" getter="get_value">
- Range's current value.
+ <member name="value" type="float" setter="set_value" getter="get_value" default="0.0">
+ Range's current value. Changing this property (even via code) will trigger [signal value_changed] signal. Use [method set_value_no_signal] if you want to avoid it.
</member>
</members>
<signals>
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index ac012e9604..28fe42afae 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -165,6 +165,12 @@
Returns [code]true[/code] if this [Rect2] and [param rect] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
</description>
</method>
+ <method name="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this [Rect2] is finite, by calling [method @GlobalScope.is_finite] on each component.
+ </description>
+ </method>
<method name="merge" qualifiers="const">
<return type="Rect2" />
<param index="0" name="b" type="Rect2" />
diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml
index eb85a4adb4..2de812f5fc 100644
--- a/doc/classes/RenderingDevice.xml
+++ b/doc/classes/RenderingDevice.xml
@@ -232,7 +232,7 @@
<param index="0" name="draw_list" type="int" />
<param index="1" name="color" type="Color" />
<description>
- Sets blend constants for draw list, blend constants are used only if the graphics pipeline is created with [code]DYNAMIC_STATE_BLEND_CONSTANTS[/code] flag set.
+ Sets blend constants for draw list, blend constants are used only if the graphics pipeline is created with [constant DYNAMIC_STATE_BLEND_CONSTANTS] flag set.
</description>
</method>
<method name="draw_list_set_push_constant">
@@ -643,6 +643,15 @@
<description>
</description>
</method>
+ <method name="vertex_array_create">
+ <return type="RID" />
+ <param index="0" name="vertex_count" type="int" />
+ <param index="1" name="vertex_format" type="int" />
+ <param index="2" name="src_buffers" type="RID[]" />
+ <description>
+ Creates a vertex array based on the specified buffers.
+ </description>
+ </method>
<method name="vertex_buffer_create">
<return type="RID" />
<param index="0" name="size_bytes" type="int" />
@@ -1581,6 +1590,10 @@
</constant>
<constant name="LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Z" value="34" enum="Limit">
</constant>
+ <constant name="LIMIT_MAX_VIEWPORT_DIMENSIONS_X" value="35" enum="Limit">
+ </constant>
+ <constant name="LIMIT_MAX_VIEWPORT_DIMENSIONS_Y" value="36" enum="Limit">
+ </constant>
<constant name="MEMORY_TEXTURES" value="0" enum="MemoryType">
</constant>
<constant name="MEMORY_BUFFERS" value="1" enum="MemoryType">
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 6aa9237385..13e5470a56 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -13,6 +13,7 @@
Similarly, in 2D, a canvas is needed to draw all canvas items.
In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using [method instance_set_base]. The instance must also be attached to the scenario using [method instance_set_scenario] in order to be visible.
In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas.
+ [b]Headless mode:[/b] Starting the engine with the [code]--headless[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url] disables all rendering and window management functions. Most functions from [RenderingServer] will return dummy values in this case.
</description>
<tutorials>
<link title="Optimization using Servers">$DOCS_URL/tutorials/performance/using_servers.html</link>
@@ -498,6 +499,14 @@
Sets if the [CanvasItem] uses its parent's material.
</description>
</method>
+ <method name="canvas_item_set_visibility_layer">
+ <return type="void" />
+ <param index="0" name="item" type="RID" />
+ <param index="1" name="visibility_layer" type="int" />
+ <description>
+ Sets the rendering visibility layer associated with this [CanvasItem]. Only [Viewport] nodes with a matching rendering mask will render this [CanvasItem].
+ </description>
+ </method>
<method name="canvas_item_set_visibility_notifier">
<return type="void" />
<param index="0" name="item" type="RID" />
@@ -3015,6 +3024,14 @@
<description>
</description>
</method>
+ <method name="texture_get_rd_texture" qualifiers="const">
+ <return type="RID" />
+ <param index="0" name="texture" type="RID" />
+ <param index="1" name="srgb" type="bool" default="false" />
+ <description>
+ Returns a texture [RID] that can be used with [RenderingDevice].
+ </description>
+ </method>
<method name="texture_proxy_create">
<return type="RID" />
<param index="0" name="base" type="RID" />
@@ -3142,6 +3159,14 @@
If [code]true[/code], sets the viewport active, else sets it inactive.
</description>
</method>
+ <method name="viewport_set_canvas_cull_mask">
+ <return type="void" />
+ <param index="0" name="viewport" type="RID" />
+ <param index="1" name="canvas_cull_mask" type="int" />
+ <description>
+ Sets the rendering mask associated with this [Viewport]. Only [CanvasItem] nodes with a matching rendering visibility layer will be rendered by this [Viewport].
+ </description>
+ </method>
<method name="viewport_set_canvas_stacking">
<return type="void" />
<param index="0" name="viewport" type="RID" />
@@ -4576,9 +4601,11 @@
</constant>
<constant name="CANVAS_GROUP_MODE_DISABLED" value="0" enum="CanvasGroupMode">
</constant>
- <constant name="CANVAS_GROUP_MODE_OPAQUE" value="1" enum="CanvasGroupMode">
+ <constant name="CANVAS_GROUP_MODE_CLIP_ONLY" value="1" enum="CanvasGroupMode">
+ </constant>
+ <constant name="CANVAS_GROUP_MODE_CLIP_AND_DRAW" value="2" enum="CanvasGroupMode">
</constant>
- <constant name="CANVAS_GROUP_MODE_TRANSPARENT" value="2" enum="CanvasGroupMode">
+ <constant name="CANVAS_GROUP_MODE_TRANSPARENT" value="3" enum="CanvasGroupMode">
</constant>
<constant name="CANVAS_LIGHT_MODE_POINT" value="0" enum="CanvasLightMode">
</constant>
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index 3adf10da2d..e533fc1e32 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -4,7 +4,8 @@
Base class for all resources.
</brief_description>
<description>
- Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Since they inherit from [RefCounted], resources are reference-counted and freed when no longer in use. They are also cached once loaded from disk, so that any further attempts to load a resource from a given path will return the same reference (all this in contrast to a [Node], which is not reference-counted and can be instantiated from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource.
+ Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Since they inherit from [RefCounted], resources are reference-counted and freed when no longer in use. They can also be nested within other resources, and saved on disk. Once loaded from disk, further attempts to load a resource by [member resource_path] returns the same reference. [PackedScene], one of the most common [Object]s in a Godot project, is also a resource, uniquely capable of storing and instantiating the [Node]s it contains as many times as desired.
+ In GDScript, resources can loaded from disk by their [member resource_path] using [method @GDScript.load] or [method @GDScript.preload].
[b]Note:[/b] In C#, resources will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free resources that are no longer in use. This means that unused resources will linger on for a while before being removed.
</description>
<tutorials>
@@ -15,77 +16,94 @@
<method name="_get_rid" qualifiers="virtual">
<return type="RID" />
<description>
+ Override this method to return a custom [RID] when [method get_rid] is called.
</description>
</method>
<method name="duplicate" qualifiers="const">
<return type="Resource" />
<param index="0" name="subresources" type="bool" default="false" />
<description>
- Duplicates the resource, returning a new resource with the exported members copied. [b]Note:[/b] To duplicate the resource the constructor is called without arguments. This method will error when the constructor doesn't have default values.
- By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing [code]true[/code] to the [param subresources] argument which will copy the subresources.
- [b]Note:[/b] If [param subresources] is [code]true[/code], this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared.
- [b]Note:[/b] When duplicating a resource, only [code]export[/code]ed properties are copied. Other properties will be set to their default value in the new resource.
+ Duplicates this resource, returning a new resource with its [code]export[/code]ed or [constant PROPERTY_USAGE_STORAGE] properties copied from the original.
+ If [param subresources] is [code]false[/code], a shallow copy is returned. Nested resources within subresources are not duplicated and are shared from the original resource. This behavior can be overridden by the [constant PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE] flag.
+ [b]Note:[/b] For custom resources, this method will fail if [method Object._init] has been defined with required parameters.
</description>
</method>
<method name="emit_changed">
<return type="void" />
<description>
- Emits the [signal changed] signal.
- If external objects which depend on this resource should be updated, this method must be called manually whenever the state of this resource has changed (such as modification of properties).
- The method is equivalent to:
+ Emits the [signal changed] signal. This method is called automatically for built-in resources.
+ [b]Note:[/b] For custom resources, it's recommended to call this method whenever a meaningful change occurs, such as a modified property. This ensures that custom [Object]s depending on the resource are properly updated.
[codeblock]
- emit_signal("changed")
+ var damage:
+ set(new_value):
+ if damage != new_value:
+ damage = new_value
+ emit_changed()
[/codeblock]
- [b]Note:[/b] This method is called automatically for built-in resources.
</description>
</method>
<method name="get_local_scene" qualifiers="const">
<return type="Node" />
<description>
- If [member resource_local_to_scene] is enabled and the resource was loaded from a [PackedScene] instantiation, returns the local scene where this resource's unique copy is in use. Otherwise, returns [code]null[/code].
+ If [member resource_local_to_scene] is set to [code]true[/code] and the resource has been loaded from a [PackedScene] instantiation, returns the root [Node] of the scene where this resource is used. Otherwise, returns [code]null[/code].
</description>
</method>
<method name="get_rid" qualifiers="const">
<return type="RID" />
<description>
- Returns the RID of the resource (or an empty RID). Many resources (such as [Texture2D], [Mesh], etc) are high-level abstractions of resources stored in a server, so this function will return the original RID.
+ Returns the [RID] of this resource (or an empty RID). Many resources (such as [Texture2D], [Mesh], and so on) are high-level abstractions of resources stored in a specialized server ([DisplayServer], [RenderingServer], etc.), so this function will return the original [RID].
</description>
</method>
<method name="setup_local_to_scene">
<return type="void" />
<description>
- This method is called when a resource with [member resource_local_to_scene] enabled is loaded from a [PackedScene] instantiation. Its behavior can be customized by connecting [signal setup_local_to_scene_requested] from script.
- For most resources, this method performs no base logic. [ViewportTexture] performs custom logic to properly set the proxy texture and flags in the local viewport.
+ Emits the [signal setup_local_to_scene_requested] signal. If [member resource_local_to_scene] is set to [code]true[/code], this method is called from [method PackedScene.instantiate] by the newly duplicated resource within the scene instance.
+ For most resources, this method performs no logic of its own. Custom behavior can be defined by connecting [signal setup_local_to_scene_requested] from a script, [b]not[/b] by overriding this method.
+ [b]Example:[/b] Assign a random value to [code]health[/code] for every duplicated Resource from an instantiated scene, excluding the original.
+ [codeblock]
+ extends Resource
+
+ var health = 0
+
+ func _init():
+ setup_local_to_scene_requested.connect(randomize_health)
+
+ func randomize_health():
+ health = randi_range(10, 40)
+ [/codeblock]
</description>
</method>
<method name="take_over_path">
<return type="void" />
<param index="0" name="path" type="String" />
<description>
- Sets the path of the resource, potentially overriding an existing cache entry for this path. This differs from setting [member resource_path], as the latter would error out if another resource was already cached for the given path.
+ Sets the [member resource_path] to [param path], potentially overriding an existing cache entry for this path. Further attempts to load an overridden resource by path will instead return this resource.
</description>
</method>
</methods>
<members>
<member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" default="false">
- If [code]true[/code], the resource will be made unique in each instance of its local scene. It can thus be modified in a scene instance without impacting other instances of that same scene.
+ If [code]true[/code], the resource is duplicated for each instance of all scenes using it. At run-time, the resource can be modified in one scene without affecting other instances (see [method PackedScene.instantiate]).
+ [b]Note:[/b] Changing this property at run-time has no effect on already created duplicate resources.
</member>
<member name="resource_name" type="String" setter="set_name" getter="get_name" default="&quot;&quot;">
- The name of the resource. This is an optional identifier. If [member resource_name] is not empty, its value will be displayed to represent the current resource in the editor inspector. For built-in scripts, the [member resource_name] will be displayed as the tab name in the script editor.
+ An optional name for this resource. When defined, its value is displayed to represent the resource in the Inspector dock. For built-in scripts, the name is displayed as part of the tab name in the script editor.
</member>
<member name="resource_path" type="String" setter="set_path" getter="get_path" default="&quot;&quot;">
- The path to the resource. In case it has its own file, it will return its filepath. If it's tied to the scene, it will return the scene's path, followed by the resource's index.
+ The unique path to this resource. If it has been saved to disk, the value will be its filepath. If the resource is exclusively contained within a scene, the value will be the [PackedScene]'s filepath, followed by an unique identifier.
+ [b]Note:[/b] Setting this property manually may fail if a resource with the same path has already been previously loaded. If necessary, use [method take_over_path].
</member>
</members>
<signals>
<signal name="changed">
<description>
- Emitted whenever the resource changes.
- [b]Note:[/b] This signal is not emitted automatically for custom resources, which means that you need to create a setter and emit the signal yourself.
+ Emitted when the resource changes, usually when one of its properties is modified. See also [method emit_changed].
+ [b]Note:[/b] This signal is not emitted automatically for properties of custom resources. If necessary, a setter needs to be created to emit the signal.
</description>
</signal>
<signal name="setup_local_to_scene_requested">
<description>
+ Emitted when [method setup_local_to_scene] is called, usually by a newly duplicated resource with [member resource_local_to_scene] set to [code]true[/code]. Custom behavior can be defined by connecting this signal.
</description>
</signal>
</signals>
diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml
index 9b8c8d4d9d..2b6376f2cd 100644
--- a/doc/classes/ResourceFormatLoader.xml
+++ b/doc/classes/ResourceFormatLoader.xml
@@ -71,6 +71,15 @@
The [param cache_mode] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details.
</description>
</method>
+ <method name="_recognize_path" qualifiers="virtual const">
+ <return type="bool" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="type" type="StringName" />
+ <description>
+ Tells whether or not this loader should load a resource from its resource path for a given type.
+ If it is not implemented, the default behavior returns whether the path's extension is within the ones provided by [method _get_recognized_extensions], and if the type is within the ones provided by [method _get_resource_type].
+ </description>
+ </method>
<method name="_rename_dependencies" qualifiers="virtual const">
<return type="int" />
<param index="0" name="path" type="String" />
diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml
index 05bfcf3446..1f2af6d157 100644
--- a/doc/classes/ResourceFormatSaver.xml
+++ b/doc/classes/ResourceFormatSaver.xml
@@ -24,6 +24,15 @@
Returns whether the given resource object can be saved by this saver.
</description>
</method>
+ <method name="_recognize_path" qualifiers="virtual const">
+ <return type="bool" />
+ <param index="0" name="resource" type="Resource" />
+ <param index="1" name="path" type="String" />
+ <description>
+ Returns [code]true[/code] if this saver handles a given save path and [code]false[/code] otherwise.
+ If this method is not implemented, the default behavior returns whether the path's extension is within the ones provided by [method _get_recognized_extensions].
+ </description>
+ </method>
<method name="_save" qualifiers="virtual">
<return type="int" />
<param index="0" name="resource" type="Resource" />
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index f4cbf4c442..cb2481f705 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -23,9 +23,11 @@
<param index="2" name="height" type="int" default="0" />
<param index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" />
<param index="4" name="inline_align" type="int" enum="InlineAlignment" default="5" />
+ <param index="5" name="region" type="Rect2" default="Rect2(0, 0, 0, 0)" />
<description>
- Adds an image's opening and closing tags to the tag stack, optionally providing a [param width] and [param height] to resize the image and a [param color] to tint the image.
+ Adds an image's opening and closing tags to the tag stack, optionally providing a [param width] and [param height] to resize the image, a [param color] to tint the image and a [param region] to only use parts of the image.
If [param width] or [param height] is set to 0, the image size will be adjusted in order to keep the original aspect ratio.
+ If [param width] and [param height] are not set, but [param region] is, the region's rect will be used.
</description>
</method>
<method name="add_text">
@@ -477,9 +479,6 @@
<member name="meta_underlined" type="bool" setter="set_meta_underline" getter="is_meta_underlined" default="true">
If [code]true[/code], the label underlines meta tags such as [code][url]{text}[/url][/code].
</member>
- <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false">
- If [code]true[/code], the label uses the custom font color.
- </member>
<member name="progress_bar_delay" type="int" setter="set_progress_bar_delay" getter="get_progress_bar_delay" default="1000">
The delay after which the loading progress bar is displayed, in milliseconds. Set to [code]-1[/code] to disable progress bar entirely.
[b]Note:[/b] Progress bar is displayed only if [member threaded] is enabled.
@@ -627,8 +626,8 @@
<theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The default tint of text outline.
</theme_item>
- <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)">
- The color of selected text, used when [member selection_enabled] is [code]true[/code].
+ <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
+ The color of selected text, used when [member selection_enabled] is [code]true[/code]. If equal to [code]Color(0, 0, 0, 0)[/code], it will be ignored.
</theme_item>
<theme_item name="font_shadow_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
The color of the font's shadow.
@@ -666,6 +665,12 @@
<theme_item name="table_v_separation" data_type="constant" type="int" default="3">
The vertical separation of elements in a table.
</theme_item>
+ <theme_item name="text_highlight_h_padding" data_type="constant" type="int" default="3">
+ The horizontal padding around a highlighting and background color box.
+ </theme_item>
+ <theme_item name="text_highlight_v_padding" data_type="constant" type="int" default="3">
+ The vertical padding around a highlighting and background color box.
+ </theme_item>
<theme_item name="bold_font" data_type="font" type="Font">
The font used for bold text.
</theme_item>
diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml
index 9eedc3a24c..6e3535f14a 100644
--- a/doc/classes/RigidBody2D.xml
+++ b/doc/classes/RigidBody2D.xml
@@ -87,6 +87,7 @@
<param index="0" name="torque" type="float" />
<description>
Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
+ [b]Note:[/b] [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape2D] must be a child of the node, or you can manually set [member inertia].
</description>
</method>
<method name="apply_torque_impulse">
@@ -95,6 +96,7 @@
<description>
Applies a rotational impulse to the body without affecting the position.
An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ [b]Note:[/b] [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape2D] must be a child of the node, or you can manually set [member inertia].
</description>
</method>
<method name="get_colliding_bodies" qualifiers="const">
diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidBody3D.xml
index 3ee3f25df1..8380d56de3 100644
--- a/doc/classes/RigidBody3D.xml
+++ b/doc/classes/RigidBody3D.xml
@@ -87,6 +87,7 @@
<param index="0" name="torque" type="Vector3" />
<description>
Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
+ [b]Note:[/b] [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape3D] must be a child of the node, or you can manually set [member inertia].
</description>
</method>
<method name="apply_torque_impulse">
@@ -95,6 +96,7 @@
<description>
Applies a rotational impulse to the body without affecting the position.
An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
+ [b]Note:[/b] [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape3D] must be a child of the node, or you can manually set [member inertia].
</description>
</method>
<method name="get_colliding_bodies" qualifiers="const">
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
index 40ec8ed429..b4b14c01c6 100644
--- a/doc/classes/Script.xml
+++ b/doc/classes/Script.xml
@@ -4,7 +4,7 @@
A class stored as a resource.
</brief_description>
<description>
- A class stored as a resource. A script extends the functionality of all objects that instance it.
+ A class stored as a resource. A script extends the functionality of all objects that instantiate it.
This is the base class for all scripts and should not be used directly. Trying to create a new script with this class will result in an error.
The [code]new[/code] method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes.
</description>
diff --git a/doc/classes/ScrollBar.xml b/doc/classes/ScrollBar.xml
index d0dd69408e..247e892c24 100644
--- a/doc/classes/ScrollBar.xml
+++ b/doc/classes/ScrollBar.xml
@@ -12,6 +12,7 @@
<member name="custom_step" type="float" setter="set_custom_step" getter="get_custom_step" default="-1.0">
Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the [ScrollBar] is focused.
</member>
+ <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="0.0" />
</members>
<signals>
<signal name="scrolling">
diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml
index f5018c25ff..b96b7187e4 100644
--- a/doc/classes/ScrollContainer.xml
+++ b/doc/classes/ScrollContainer.xml
@@ -6,7 +6,7 @@
<description>
A ScrollContainer node meant to contain a [Control] child.
ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.custom_minimum_size] of the Control relative to the ScrollContainer.
- Works great with a [Panel] control. You can set [code]EXPAND[/code] on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension).
+ Works great with a [Panel] control. You can set [constant Control.SIZE_EXPAND] on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension).
</description>
<tutorials>
<link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.html</link>
diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml
index 34ca228795..7be0ba64d6 100644
--- a/doc/classes/Shape2D.xml
+++ b/doc/classes/Shape2D.xml
@@ -66,6 +66,12 @@
Draws a solid shape onto a [CanvasItem] with the [RenderingServer] API filled with the specified [param color]. The exact drawing method is specific for each shape and cannot be configured.
</description>
</method>
+ <method name="get_rect" qualifiers="const">
+ <return type="Rect2" />
+ <description>
+ Returns a [Rect2] representing the shapes boundary.
+ </description>
+ </method>
</methods>
<members>
<member name="custom_solver_bias" type="float" setter="set_custom_solver_bias" getter="get_custom_solver_bias" default="0.0">
diff --git a/doc/classes/ShapeCast2D.xml b/doc/classes/ShapeCast2D.xml
index 36c3beecb1..5a8eec3921 100644
--- a/doc/classes/ShapeCast2D.xml
+++ b/doc/classes/ShapeCast2D.xml
@@ -58,6 +58,13 @@
Returns the collided [Object] of one of the multiple collisions at [param index], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
</description>
</method>
+ <method name="get_collider_rid" qualifiers="const">
+ <return type="RID" />
+ <param index="0" name="index" type="int" />
+ <description>
+ Returns the [RID] of the collided object of one of the multiple collisions at [param index].
+ </description>
+ </method>
<method name="get_collider_shape" qualifiers="const">
<return type="int" />
<param index="0" name="index" type="int" />
diff --git a/doc/classes/ShapeCast3D.xml b/doc/classes/ShapeCast3D.xml
index cbdf660133..735b91cee9 100644
--- a/doc/classes/ShapeCast3D.xml
+++ b/doc/classes/ShapeCast3D.xml
@@ -58,6 +58,13 @@
Returns the collided [Object] of one of the multiple collisions at [param index], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]).
</description>
</method>
+ <method name="get_collider_rid" qualifiers="const">
+ <return type="RID" />
+ <param index="0" name="index" type="int" />
+ <description>
+ Returns the [RID] of the collided object of one of the multiple collisions at [param index].
+ </description>
+ </method>
<method name="get_collider_shape" qualifiers="const">
<return type="int" />
<param index="0" name="index" type="int" />
diff --git a/doc/classes/SkeletonProfile.xml b/doc/classes/SkeletonProfile.xml
index 55d21f3224..57bdd52d9e 100644
--- a/doc/classes/SkeletonProfile.xml
+++ b/doc/classes/SkeletonProfile.xml
@@ -7,6 +7,7 @@
This resource is used in [EditorScenePostImport]. Some parameters are referring to bones in [Skeleton3D], [Skin], [Animation], and some other nodes are rewritten based on the parameters of [SkeletonProfile].
</description>
<tutorials>
+ <link title="Retargeting 3D Skeletons">$DOCS_URL/tutorials/assets_pipeline/retargeting_3d_skeletons.html</link>
</tutorials>
<methods>
<method name="find_bone" qualifiers="const">
diff --git a/doc/classes/SkeletonProfileHumanoid.xml b/doc/classes/SkeletonProfileHumanoid.xml
index 11f0521718..0dbd66d8d6 100644
--- a/doc/classes/SkeletonProfileHumanoid.xml
+++ b/doc/classes/SkeletonProfileHumanoid.xml
@@ -6,6 +6,7 @@
A [SkeletonProfile] as a preset that is optimized for the human form. This exists for standardization, so all parameters are read-only.
</description>
<tutorials>
+ <link title="Retargeting 3D Skeletons">$DOCS_URL/tutorials/assets_pipeline/retargeting_3d_skeletons.html</link>
</tutorials>
<members>
<member name="bone_size" type="int" setter="set_bone_size" getter="get_bone_size" overrides="SkeletonProfile" default="56" />
diff --git a/doc/classes/Slider.xml b/doc/classes/Slider.xml
index c3dbd69e59..cecca0a5fb 100644
--- a/doc/classes/Slider.xml
+++ b/doc/classes/Slider.xml
@@ -13,9 +13,11 @@
<member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true">
If [code]true[/code], the slider can be interacted with. If [code]false[/code], the value can be changed only by code.
</member>
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="scrollable" type="bool" setter="set_scrollable" getter="is_scrollable" default="true">
If [code]true[/code], the value can be changed using the mouse wheel.
</member>
+ <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="1.0" />
<member name="tick_count" type="int" setter="set_ticks" getter="get_ticks" default="0">
Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers.
</member>
diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml
index 8df039794a..e214867890 100644
--- a/doc/classes/SpinBox.xml
+++ b/doc/classes/SpinBox.xml
@@ -56,6 +56,11 @@
<member name="prefix" type="String" setter="set_prefix" getter="get_prefix" default="&quot;&quot;">
Adds the specified [code]prefix[/code] string before the numerical value of the [SpinBox].
</member>
+ <member name="select_all_on_focus" type="bool" setter="set_select_all_on_focus" getter="is_select_all_on_focus" default="false">
+ If [code]true[/code], the [SpinBox] will select the whole text when the [LineEdit] gains focus. Clicking the up and down arrows won't trigger this behavior.
+ </member>
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" />
+ <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="1.0" />
<member name="suffix" type="String" setter="set_suffix" getter="get_suffix" default="&quot;&quot;">
Adds the specified [code]suffix[/code] string after the numerical value of the [SpinBox].
</member>
diff --git a/doc/classes/SpotLight3D.xml b/doc/classes/SpotLight3D.xml
index 62cb55daec..28e2ef0d95 100644
--- a/doc/classes/SpotLight3D.xml
+++ b/doc/classes/SpotLight3D.xml
@@ -14,6 +14,7 @@
<member name="shadow_bias" type="float" setter="set_param" getter="get_param" overrides="Light3D" default="0.03" />
<member name="spot_angle" type="float" setter="set_param" getter="get_param" default="45.0">
The spotlight's angle in degrees.
+ [b]Note:[/b] [member spot_angle] is not affected by [member Node3D.scale] (the light's scale or its parent's scale).
</member>
<member name="spot_angle_attenuation" type="float" setter="set_param" getter="get_param" default="1.0">
The spotlight's angular attenuation curve.
@@ -23,6 +24,7 @@
</member>
<member name="spot_range" type="float" setter="set_param" getter="get_param" default="5.0">
The maximal range that can be reached by the spotlight. Note that the effectively lit area may appear to be smaller depending on the [member spot_attenuation] in use. No matter the [member spot_attenuation] in use, the light will never reach anything outside this range.
+ [b]Note:[/b] [member spot_range] is not affected by [member Node3D.scale] (the light's scale or its parent's scale).
</member>
</members>
</class>
diff --git a/doc/classes/Sprite2D.xml b/doc/classes/Sprite2D.xml
index 83532721b2..235fef0bdd 100644
--- a/doc/classes/Sprite2D.xml
+++ b/doc/classes/Sprite2D.xml
@@ -13,7 +13,8 @@
<method name="get_rect" qualifiers="const">
<return type="Rect2" />
<description>
- Returns a [Rect2] representing the Sprite2D's boundary in local coordinates. Can be used to detect if the Sprite2D was clicked. Example:
+ Returns a [Rect2] representing the Sprite2D's boundary in local coordinates. Can be used to detect if the Sprite2D was clicked.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
func _input(event):
diff --git a/doc/classes/StandardMaterial3D.xml b/doc/classes/StandardMaterial3D.xml
index bd6e5cdfa2..0f6a3168eb 100644
--- a/doc/classes/StandardMaterial3D.xml
+++ b/doc/classes/StandardMaterial3D.xml
@@ -4,7 +4,7 @@
Physically based rendering (PBR) material that can be applied to 3D objects.
</brief_description>
<description>
- StandardMaterial3D's properties are inherited from [BaseMaterial3D].
+ [StandardMaterial3D]'s properties are inherited from [BaseMaterial3D]. [StandardMaterial3D] uses separate textures for ambient occlusion, roughness and metallic maps. To use a single ORM map for all 3 textures, use an [ORMMaterial3D] instead.
</description>
<tutorials>
<link title="Standard Material 3D and ORM Material 3D">$DOCS_URL/tutorials/3d/standard_material_3d.html</link>
diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml
index 4188563695..f05b5f7dbf 100644
--- a/doc/classes/StreamPeer.xml
+++ b/doc/classes/StreamPeer.xml
@@ -44,7 +44,7 @@
<return type="Array" />
<param index="0" name="bytes" type="int" />
<description>
- Returns a chunk data with the received bytes. The number of bytes to be received can be requested in the [param bytes] argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an [enum @GlobalScope.Error] code and a data array.
+ Returns a chunk data with the received bytes. The number of bytes to be received can be requested in the [param bytes] argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an [enum Error] code and a data array.
</description>
</method>
<method name="get_double">
@@ -63,7 +63,7 @@
<return type="Array" />
<param index="0" name="bytes" type="int" />
<description>
- Returns a chunk data with the received bytes. The number of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an [enum @GlobalScope.Error] code, and a data array.
+ Returns a chunk data with the received bytes. The number of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an [enum Error] code, and a data array.
</description>
</method>
<method name="get_string">
@@ -144,7 +144,7 @@
<return type="int" enum="Error" />
<param index="0" name="data" type="PackedByteArray" />
<description>
- Sends a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an [enum @GlobalScope.Error] code.
+ Sends a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an [enum Error] code.
</description>
</method>
<method name="put_double">
@@ -165,7 +165,7 @@
<return type="Array" />
<param index="0" name="data" type="PackedByteArray" />
<description>
- Sends a chunk of data through the connection. If all the data could not be sent at once, only part of it will. This function returns two values, an [enum @GlobalScope.Error] code and an integer, describing how much data was actually sent.
+ Sends a chunk of data through the connection. If all the data could not be sent at once, only part of it will. This function returns two values, an [enum Error] code and an integer, describing how much data was actually sent.
</description>
</method>
<method name="put_string">
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index 316bb923b7..999913b1ac 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>
@@ -239,7 +239,7 @@
<description>
Splits a string using a [param delimiter] and returns a substring at index [param slice]. Returns an empty string if the index doesn't exist.
This is a more performant alternative to [method split] for cases when you need only one element from the array at a fixed index.
- Example:
+ [b]Example:[/b]
[codeblock]
print("i/am/example/string".get_slice("/", 2)) # Prints 'example'.
[/codeblock]
@@ -364,7 +364,7 @@
<return type="bool" />
<param index="0" name="with_prefix" type="bool" default="false" />
<description>
- Returns [code]true[/code] if this string contains a valid hexadecimal number. If [param with_prefix] is [code]true[/code], then a validity of the hexadecimal number is determined by [code]0x[/code] prefix, for instance: [code]0xDEADC0DE[/code].
+ Returns [code]true[/code] if this string contains a valid hexadecimal number. If [param with_prefix] is [code]true[/code], then a validity of the hexadecimal number is determined by the [code]0x[/code] prefix, for example: [code]0xDEADC0DE[/code].
</description>
</method>
<method name="is_valid_html_color" qualifiers="const">
@@ -408,7 +408,7 @@
<param index="0" name="parts" type="PackedStringArray" />
<description>
Returns a [String] which is the concatenation of the [param parts]. The separator between elements is the string providing this method.
- Example:
+ [b]Example:[/b]
[codeblocks]
[gdscript]
print(", ".join(["One", "Two", "Three", "Four"]))
@@ -430,7 +430,7 @@
<param index="0" name="length" type="int" />
<description>
Returns a number of characters from the left of the string. If negative [param length] is used, the characters are counted downwards from [String]'s length.
- Examples:
+ [b]Example:[/b]
[codeblock]
print("sample text".left(3)) #prints "sam"
print("sample text".left(-3)) #prints "sample t"
@@ -514,7 +514,7 @@
Converts a [float] to a string representation of a decimal number.
The number of decimal places can be specified with [param decimals]. If [param decimals] is [code]-1[/code] (default), decimal places will be automatically adjusted so that the string representation has 14 significant digits (counting both digits to the left and the right of the decimal point).
Trailing zeros are not included in the string. The last digit will be rounded and not truncated.
- Some examples:
+ [b]Example:[/b]
[codeblock]
String.num(3.141593) # "3.141593"
String.num(3.141593, 3) # "3.142"
@@ -617,7 +617,7 @@
<param index="0" name="length" type="int" />
<description>
Returns a number of characters from the right of the string. If negative [param length] is used, the characters are counted downwards from [String]'s length.
- Examples:
+ [b]Example:[/b]
[codeblock]
print("sample text".right(3)) #prints "ext"
print("sample text".right(-3)) #prints "ple text"
@@ -634,15 +634,15 @@
</method>
<method name="rsplit" qualifiers="const">
<return type="PackedStringArray" />
- <param index="0" name="delimiter" type="String" />
+ <param index="0" name="delimiter" type="String" default="&quot;&quot;" />
<param index="1" name="allow_empty" type="bool" default="true" />
<param index="2" name="maxsplit" type="int" default="0" />
<description>
- Splits the string by a [param delimiter] string and returns an array of the substrings, starting from right.
+ Splits the string by a [param delimiter] string and returns an array of the substrings, starting from right. If [param delimiter] is an empty string, each substring will be a single character.
The splits in the returned array are sorted in the same order as the original string, from left to right.
If [param allow_empty] is [code]true[/code], and there are two adjacent delimiters in the string, it will add an empty string to the array of substrings at this position.
If [param maxsplit] is specified, it defines the number of splits to do from the right up to [param maxsplit]. The default value of 0 means that all items are split, thus giving the same result as [method split].
- Example:
+ [b]Example:[/b]
[codeblocks]
[gdscript]
var some_string = "One,Two,Three,Four"
@@ -710,15 +710,15 @@
</method>
<method name="split" qualifiers="const">
<return type="PackedStringArray" />
- <param index="0" name="delimiter" type="String" />
+ <param index="0" name="delimiter" type="String" default="&quot;&quot;" />
<param index="1" name="allow_empty" type="bool" default="true" />
<param index="2" name="maxsplit" type="int" default="0" />
<description>
- Splits the string by a [param delimiter] string and returns an array of the substrings. The [param delimiter] can be of any length.
+ Splits the string by a [param delimiter] string and returns an array of the substrings. The [param delimiter] can be of any length. If [param delimiter] is an empty string, each substring will be a single character.
If [param allow_empty] is [code]true[/code], and there are two adjacent delimiters in the string, it will add an empty string to the array of substrings at this position.
If [param maxsplit] is specified, it defines the number of splits to do from the left up to [param maxsplit]. The default value of [code]0[/code] means that all items are split.
If you need only one element from the array at a specific index, [method get_slice] is a more performant option.
- Example:
+ [b]Example:[/b]
[codeblocks]
[gdscript]
var some_string = "One,Two,Three,Four"
@@ -940,12 +940,6 @@
<description>
</description>
</operator>
- <operator name="operator +">
- <return type="String" />
- <param index="0" name="right" type="int" />
- <description>
- </description>
- </operator>
<operator name="operator &lt;">
<return type="bool" />
<param index="0" name="right" type="String" />
diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml
index 8656cde4a0..ff6d4d8821 100644
--- a/doc/classes/StyleBox.xml
+++ b/doc/classes/StyleBox.xml
@@ -114,21 +114,21 @@
</method>
</methods>
<members>
- <member name="content_margin_bottom" type="float" setter="set_default_margin" getter="get_default_margin">
+ <member name="content_margin_bottom" type="float" setter="set_default_margin" getter="get_default_margin" default="-1.0">
The bottom margin for the contents of this style box. Increasing this value reduces the space available to the contents from the bottom.
If this value is negative, it is ignored and a child-specific margin is used instead. For example for [StyleBoxFlat] the border thickness (if any) is used instead.
It is up to the code using this style box to decide what these contents are: for example, a [Button] respects this content margin for the textual contents of the button.
[method get_margin] should be used to fetch this value as consumer instead of reading these properties directly. This is because it correctly respects negative values and the fallback mentioned above.
</member>
- <member name="content_margin_left" type="float" setter="set_default_margin" getter="get_default_margin">
+ <member name="content_margin_left" type="float" setter="set_default_margin" getter="get_default_margin" default="-1.0">
The left margin for the contents of this style box. Increasing this value reduces the space available to the contents from the left.
Refer to [member content_margin_bottom] for extra considerations.
</member>
- <member name="content_margin_right" type="float" setter="set_default_margin" getter="get_default_margin">
+ <member name="content_margin_right" type="float" setter="set_default_margin" getter="get_default_margin" default="-1.0">
The right margin for the contents of this style box. Increasing this value reduces the space available to the contents from the right.
Refer to [member content_margin_bottom] for extra considerations.
</member>
- <member name="content_margin_top" type="float" setter="set_default_margin" getter="get_default_margin">
+ <member name="content_margin_top" type="float" setter="set_default_margin" getter="get_default_margin" default="-1.0">
The top margin for the contents of this style box. Increasing this value reduces the space available to the contents from the top.
Refer to [member content_margin_bottom] for extra considerations.
</member>
diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml
index 7f6628f8ee..d6900f935c 100644
--- a/doc/classes/StyleBoxFlat.xml
+++ b/doc/classes/StyleBoxFlat.xml
@@ -9,7 +9,8 @@
- Border width (individual width for each border)
- Rounded corners (individual radius for each corner)
- Shadow (with blur and offset)
- Setting corner radius to high values is allowed. As soon as corners overlap, the stylebox will switch to a relative system. Example:
+ Setting corner radius to high values is allowed. As soon as corners overlap, the stylebox will switch to a relative system.
+ [b]Example:[/b]
[codeblock]
height = 30
corner_radius_top_left = 50
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index ccec691107..9d73e9fb39 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -133,6 +133,7 @@
<description>
Generates normals from vertices so you do not have to do it manually. If [param flip] is [code]true[/code], the resulting normals will be inverted. [method generate_normals] should be called [i]after[/i] generating geometry and [i]before[/i] committing the mesh using [method commit] or [method commit_to_arrays]. For correct display of normal-mapped surfaces, you will also have to generate tangents using [method generate_tangents].
[b]Note:[/b] [method generate_normals] only works if the primitive type to be set to [constant Mesh.PRIMITIVE_TRIANGLES].
+ [b]Note:[/b] [method generate_normals] takes smooth groups into account. If you don't specify any smooth group for each vertex, [method generate_normals] will smooth normals for you.
</description>
</method>
<method name="generate_tangents">
@@ -274,28 +275,28 @@
</methods>
<constants>
<constant name="CUSTOM_RGBA8_UNORM" value="0" enum="CustomFormat">
- Limits range of data passed to `set_custom` to unsigned normalized 0 to 1 stored in 8 bits per channel. See [constant Mesh.ARRAY_CUSTOM_RGBA8_UNORM].
+ Limits range of data passed to [method set_custom] to unsigned normalized 0 to 1 stored in 8 bits per channel. See [constant Mesh.ARRAY_CUSTOM_RGBA8_UNORM].
</constant>
<constant name="CUSTOM_RGBA8_SNORM" value="1" enum="CustomFormat">
- Limits range of data passed to `set_custom` to signed normalized -1 to 1 stored in 8 bits per channel. See [constant Mesh.ARRAY_CUSTOM_RGBA8_SNORM].
+ Limits range of data passed to [method set_custom] to signed normalized -1 to 1 stored in 8 bits per channel. See [constant Mesh.ARRAY_CUSTOM_RGBA8_SNORM].
</constant>
<constant name="CUSTOM_RG_HALF" value="2" enum="CustomFormat">
- Stores data passed to `set_custom` as half precision floats, and uses only red and green color channels. See [constant Mesh.ARRAY_CUSTOM_RG_HALF].
+ Stores data passed to [method set_custom] as half precision floats, and uses only red and green color channels. See [constant Mesh.ARRAY_CUSTOM_RG_HALF].
</constant>
<constant name="CUSTOM_RGBA_HALF" value="3" enum="CustomFormat">
- Stores data passed to `set_custom` as half precision floats and uses all color channels. See [constant Mesh.ARRAY_CUSTOM_RGBA_HALF].
+ Stores data passed to [method set_custom] as half precision floats and uses all color channels. See [constant Mesh.ARRAY_CUSTOM_RGBA_HALF].
</constant>
<constant name="CUSTOM_R_FLOAT" value="4" enum="CustomFormat">
- Stores data passed to `set_custom` as full precision floats, and uses only red color channel. See [constant Mesh.ARRAY_CUSTOM_R_FLOAT].
+ Stores data passed to [method set_custom] as full precision floats, and uses only red color channel. See [constant Mesh.ARRAY_CUSTOM_R_FLOAT].
</constant>
<constant name="CUSTOM_RG_FLOAT" value="5" enum="CustomFormat">
- Stores data passed to `set_custom` as full precision floats, and uses only red and green color channels. See [constant Mesh.ARRAY_CUSTOM_RG_FLOAT].
+ Stores data passed to [method set_custom] as full precision floats, and uses only red and green color channels. See [constant Mesh.ARRAY_CUSTOM_RG_FLOAT].
</constant>
<constant name="CUSTOM_RGB_FLOAT" value="6" enum="CustomFormat">
- Stores data passed to `set_custom` as full precision floats, and uses only red, green and blue color channels. See [constant Mesh.ARRAY_CUSTOM_RGB_FLOAT].
+ Stores data passed to [method set_custom] as full precision floats, and uses only red, green and blue color channels. See [constant Mesh.ARRAY_CUSTOM_RGB_FLOAT].
</constant>
<constant name="CUSTOM_RGBA_FLOAT" value="7" enum="CustomFormat">
- Stores data passed to `set_custom` as full precision floats, and uses all color channels. See [constant Mesh.ARRAY_CUSTOM_RGBA_FLOAT].
+ Stores data passed to [method set_custom] as full precision floats, and uses all color channels. See [constant Mesh.ARRAY_CUSTOM_RGBA_FLOAT].
</constant>
<constant name="CUSTOM_MAX" value="8" enum="CustomFormat">
Used to indicate a disabled custom channel.
diff --git a/doc/classes/SystemFont.xml b/doc/classes/SystemFont.xml
index c235843f3b..b47d6ded7d 100644
--- a/doc/classes/SystemFont.xml
+++ b/doc/classes/SystemFont.xml
@@ -41,7 +41,7 @@
Font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead.
</member>
<member name="subpixel_positioning" type="int" setter="set_subpixel_positioning" getter="get_subpixel_positioning" enum="TextServer.SubpixelPositioning" default="1">
- Font glyph sub-pixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size.
+ Font glyph subpixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size.
</member>
</members>
</class>
diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml
index 302f9b329b..e2e7a0c37e 100644
--- a/doc/classes/TabContainer.xml
+++ b/doc/classes/TabContainer.xml
@@ -217,7 +217,7 @@
</theme_item>
<theme_item name="side_margin" data_type="constant" type="int" default="8">
The space at the left or right edges of the tab bar, accordingly with the current [member tab_alignment].
- The margin is ignored with [code]ALIGNMENT_RIGHT[/code] if the tabs are clipped (see [member clip_tabs]) or a popup has been set (see [method set_popup]). The margin is always ignored with [code]ALIGNMENT_CENTER[/code].
+ The margin is ignored with [constant TabBar.ALIGNMENT_RIGHT] if the tabs are clipped (see [member clip_tabs]) or a popup has been set (see [method set_popup]). The margin is always ignored with [constant TabBar.ALIGNMENT_CENTER].
</theme_item>
<theme_item name="font" data_type="font" type="Font">
The font used to draw tab names.
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index b1fda25ecd..d4f5233438 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -63,6 +63,13 @@
Adds a new caret at the given location. Returns the index of the new caret, or [code]-1[/code] if the location is invalid.
</description>
</method>
+ <method name="add_caret_at_carets">
+ <return type="void" />
+ <param index="0" name="below" type="bool" />
+ <description>
+ Adds an additional caret above or below every caret. If [param below] is true the new caret will be added below and above otherwise.
+ </description>
+ </method>
<method name="add_gutter">
<return type="void" />
<param index="0" name="at" type="int" default="-1" />
@@ -70,6 +77,12 @@
Register a new gutter to this [TextEdit]. Use [param at] to have a specific gutter order. A value of [code]-1[/code] appends the gutter to the right.
</description>
</method>
+ <method name="add_selection_for_next_occurrence">
+ <return type="void" />
+ <description>
+ Adds a selection and a caret for the next occurrence of the current selection. If there is no active selection, selects word under caret.
+ </description>
+ </method>
<method name="adjust_carets_after_edit">
<return type="void" />
<param index="0" name="caret" type="int" />
@@ -1097,9 +1110,6 @@
The width, in pixels, of the minimap.
</member>
<member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" overrides="Control" enum="Control.CursorShape" default="1" />
- <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false">
- If [code]true[/code], custom [code]font_selected_color[/code] will be used for selected text.
- </member>
<member name="placeholder_text" type="String" setter="set_placeholder" getter="get_placeholder" default="&quot;&quot;">
Text shown when the [TextEdit] is empty. It is [b]not[/b] the [TextEdit]'s default value (see [member text]).
</member>
@@ -1363,8 +1373,8 @@
<theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)">
Sets the font [Color] when [member editable] is disabled.
</theme_item>
- <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
- Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled.
+ <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)">
+ Sets the [Color] of the selected text. If equal to [code]Color(0, 0, 0, 0)[/code], it will be ignored.
</theme_item>
<theme_item name="search_result_border_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 0.4)">
[Color] of the border around text that matches the search query.
diff --git a/doc/classes/TextLine.xml b/doc/classes/TextLine.xml
index 471c1a9040..d1dfdecbd2 100644
--- a/doc/classes/TextLine.xml
+++ b/doc/classes/TextLine.xml
@@ -144,6 +144,7 @@
</methods>
<members>
<member name="alignment" type="int" setter="set_horizontal_alignment" getter="get_horizontal_alignment" enum="HorizontalAlignment" default="0">
+ Sets text alignment within the line as if the line was horizontal.
</member>
<member name="direction" type="int" setter="set_direction" getter="get_direction" enum="TextServer.Direction" default="0">
Text writing direction.
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index 2512c563c5..f4d92ab9b6 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -380,7 +380,7 @@
<return type="int" enum="TextServer.SubpixelPositioning" />
<param index="0" name="font_rid" type="RID" />
<description>
- Returns font sub-pixel glyph positioning mode.
+ Returns font subpixel glyph positioning mode.
</description>
</method>
<method name="font_get_supported_chars" qualifiers="const">
@@ -413,7 +413,7 @@
<param index="1" name="size" type="Vector2i" />
<param index="2" name="texture_index" type="int" />
<description>
- Returns array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+ Returns array containing glyph packing data.
</description>
</method>
<method name="font_get_transform" qualifiers="const">
@@ -804,7 +804,7 @@
<param index="0" name="font_rid" type="RID" />
<param index="1" name="subpixel_positioning" type="int" enum="TextServer.SubpixelPositioning" />
<description>
- Sets font sub-pixel glyph positioning mode.
+ Sets font subpixel glyph positioning mode.
</description>
</method>
<method name="font_set_texture_image">
@@ -824,7 +824,7 @@
<param index="2" name="texture_index" type="int" />
<param index="3" name="offset" type="PackedInt32Array" />
<description>
- Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty.
+ Sets array containing glyph packing data.
</description>
</method>
<method name="font_set_transform">
@@ -1416,7 +1416,7 @@
<param index="0" name="shaped" type="RID" />
<param index="1" name="direction" type="int" enum="TextServer.Direction" default="0" />
<description>
- Sets desired text direction. If set to [code]TEXT_DIRECTION_AUTO[/code], direction will be detected based on the buffer contents and current locale.
+ Sets desired text direction. If set to [constant DIRECTION_AUTO], direction will be detected based on the buffer contents and current locale.
[b]Note:[/b] Direction is ignored if server does not support [constant FEATURE_BIDI_LAYOUT] feature (supported by [TextServerAdvanced]).
</description>
</method>
@@ -1547,23 +1547,23 @@
</constant>
<constant name="FONT_ANTIALIASING_LCD" value="2" enum="FontAntialiasing">
Font glyphs are rasterized for LCD screens.
- LCD sub-pixel layout is determined by the value of [code]gui/theme/lcd_subpixel_layout[/code] project settings.
- LCD sub-pixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D.
+ LCD subpixel layout is determined by the value of [code]gui/theme/lcd_subpixel_layout[/code] project settings.
+ LCD subpixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D.
</constant>
<constant name="FONT_LCD_SUBPIXEL_LAYOUT_NONE" value="0" enum="FontLCDSubpixelLayout">
- Unknown or unsupported sub-pixel layout, LCD sub-pixel anti-aliasing is disabled.
+ Unknown or unsupported subpixel layout, LCD subpixel antialiasing is disabled.
</constant>
<constant name="FONT_LCD_SUBPIXEL_LAYOUT_HRGB" value="1" enum="FontLCDSubpixelLayout">
- Horizontal RGB sub-pixel layout.
+ Horizontal RGB subpixel layout.
</constant>
<constant name="FONT_LCD_SUBPIXEL_LAYOUT_HBGR" value="2" enum="FontLCDSubpixelLayout">
- Horizontal BGR sub-pixel layout.
+ Horizontal BGR subpixel layout.
</constant>
<constant name="FONT_LCD_SUBPIXEL_LAYOUT_VRGB" value="3" enum="FontLCDSubpixelLayout">
- Vertical RGB sub-pixel layout.
+ Vertical RGB subpixel layout.
</constant>
<constant name="FONT_LCD_SUBPIXEL_LAYOUT_VBGR" value="4" enum="FontLCDSubpixelLayout">
- Vertical BGR sub-pixel layout.
+ Vertical BGR subpixel layout.
</constant>
<constant name="FONT_LCD_SUBPIXEL_LAYOUT_MAX" value="5" enum="FontLCDSubpixelLayout">
</constant>
@@ -1823,7 +1823,7 @@
Font have fixed-width characters.
</constant>
<constant name="STRUCTURED_TEXT_DEFAULT" value="0" enum="StructuredTextParser">
- Use default behavior. Same as [code]STRUCTURED_TEXT_NONE[/code] unless specified otherwise in the control description.
+ Use default behavior. Same as [constant STRUCTURED_TEXT_NONE] unless specified otherwise in the control description.
</constant>
<constant name="STRUCTURED_TEXT_URI" value="1" enum="StructuredTextParser">
BiDi override for URI.
diff --git a/doc/classes/Texture.xml b/doc/classes/Texture.xml
index df6e0433dc..86c9026fd1 100644
--- a/doc/classes/Texture.xml
+++ b/doc/classes/Texture.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Texture" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Base class for all texture types.
</brief_description>
<description>
+ [Texture] is the base class for all texture types. Common texture types are [Texture2D] and [ImageTexture]. See also [Image].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Texture2D.xml b/doc/classes/Texture2D.xml
index 14e89a1b74..aac197090a 100644
--- a/doc/classes/Texture2D.xml
+++ b/doc/classes/Texture2D.xml
@@ -19,6 +19,8 @@
<param index="2" name="modulate" type="Color" />
<param index="3" name="transpose" type="bool" />
<description>
+ Called when the entire [Texture2D] is requested to be drawn over a [CanvasItem], with the top-left offset specified in [param pos]. [param modulate] specifies a multiplier for the colors being drawn, while [param transpose] specifies whether drawing should be performed in column-major order instead of row-major order (resulting in 90-degree clockwise rotation).
+ [b]Note:[/b] This is only used in 2D rendering, not 3D.
</description>
</method>
<method name="_draw_rect" qualifiers="virtual const">
@@ -29,32 +31,39 @@
<param index="3" name="modulate" type="Color" />
<param index="4" name="transpose" type="bool" />
<description>
+ Called when the [Texture2D] is requested to be drawn onto [CanvasItem]'s specified [param rect]. [param modulate] specifies a multiplier for the colors being drawn, while [param transpose] specifies whether drawing should be performed in column-major order instead of row-major order (resulting in 90-degree clockwise rotation).
+ [b]Note:[/b] This is only used in 2D rendering, not 3D.
</description>
</method>
<method name="_draw_rect_region" qualifiers="virtual const">
<return type="void" />
- <param index="0" name="tp_canvas_item" type="RID" />
+ <param index="0" name="to_canvas_item" type="RID" />
<param index="1" name="rect" type="Rect2" />
<param index="2" name="src_rect" type="Rect2" />
<param index="3" name="modulate" type="Color" />
<param index="4" name="transpose" type="bool" />
<param index="5" name="clip_uv" type="bool" />
<description>
+ Called when a part of the [Texture2D] specified by [param src_rect]'s coordinates is requested to be drawn onto [CanvasItem]'s specified [param rect]. [param modulate] specifies a multiplier for the colors being drawn, while [param transpose] specifies whether drawing should be performed in column-major order instead of row-major order (resulting in 90-degree clockwise rotation).
+ [b]Note:[/b] This is only used in 2D rendering, not 3D.
</description>
</method>
<method name="_get_height" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the [Texture2D]'s height is queried.
</description>
</method>
<method name="_get_width" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the [Texture2D]'s width is queried.
</description>
</method>
<method name="_has_alpha" qualifiers="virtual const">
<return type="bool" />
<description>
+ Called when the presence of an alpha channel in the [Texture2D] is queried.
</description>
</method>
<method name="_is_pixel_opaque" qualifiers="virtual const">
@@ -62,6 +71,7 @@
<param index="0" name="x" type="int" />
<param index="1" name="y" type="int" />
<description>
+ Called when a pixel's opaque state in the [Texture2D] is queried at the specified [code](x, y)[/code] position.
</description>
</method>
<method name="draw" qualifiers="const">
@@ -100,7 +110,7 @@
<method name="get_height" qualifiers="const">
<return type="int" />
<description>
- Returns the texture height.
+ Returns the texture height in pixels.
</description>
</method>
<method name="get_image" qualifiers="const">
@@ -113,13 +123,13 @@
<method name="get_size" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the texture size.
+ Returns the texture size in pixels.
</description>
</method>
<method name="get_width" qualifiers="const">
<return type="int" />
<description>
- Returns the texture width.
+ Returns the texture width in pixels.
</description>
</method>
<method name="has_alpha" qualifiers="const">
diff --git a/doc/classes/Texture2DArray.xml b/doc/classes/Texture2DArray.xml
index 113f37f974..ec00198db1 100644
--- a/doc/classes/Texture2DArray.xml
+++ b/doc/classes/Texture2DArray.xml
@@ -4,8 +4,9 @@
A single texture resource which consists of multiple, separate images. Each image has the same dimensions and number of mipmap levels.
</brief_description>
<description>
- A Texture2DArray is different from a Texture3D: The Texture2DArray does not support trilinear interpolation between the [Image]s, i.e. no blending.
+ A Texture2DArray is different from a Texture3D: The Texture2DArray does not support trilinear interpolation between the [Image]s, i.e. no blending. See also [Cubemap] and [CubemapArray], which are texture arrays with specialized cubemap functions.
A Texture2DArray is also different from an [AtlasTexture]: In a Texture2DArray, all images are treated separately. In an atlas, the regions (i.e. the single images) can be of different sizes. Furthermore, you usually need to add a padding around the regions, to prevent accidental UV mapping to more than one region. The same goes for mipmapping: Mipmap chains are handled separately for each layer. In an atlas, the slicing has to be done manually in the fragment shader.
+ To create such a texture file yourself, reimport your image files using the Godot Editor import presets.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Texture3D.xml b/doc/classes/Texture3D.xml
index 4968f46fe8..1a66932d62 100644
--- a/doc/classes/Texture3D.xml
+++ b/doc/classes/Texture3D.xml
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Texture3D" inherits="Texture" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Base class for 3-dimensionnal textures.
</brief_description>
<description>
+ Base class for [ImageTexture3D] and [CompressedTexture3D]. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. [Texture3D] is the base class for all 3-dimensional texture types. See also [TextureLayered].
+ All images need to have the same width, height and number of mipmap levels.
+ To create such a texture file yourself, reimport your image files using the Godot Editor import presets.
</description>
<tutorials>
</tutorials>
@@ -10,61 +14,73 @@
<method name="_get_data" qualifiers="virtual const">
<return type="Image[]" />
<description>
+ Called when the [Texture3D]'s data is queried.
</description>
</method>
<method name="_get_depth" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the [Texture3D]'s depth is queried.
</description>
</method>
<method name="_get_format" qualifiers="virtual const">
<return type="int" enum="Image.Format" />
<description>
+ Called when the [Texture3D]'s format is queried.
</description>
</method>
<method name="_get_height" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the [Texture3D]'s height is queried.
</description>
</method>
<method name="_get_width" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the [Texture3D]'s width is queried.
</description>
</method>
<method name="_has_mipmaps" qualifiers="virtual const">
<return type="bool" />
<description>
+ Called when the presence of mipmaps in the [Texture3D] is queried.
</description>
</method>
<method name="get_data" qualifiers="const">
<return type="Image[]" />
<description>
+ Returns the [Texture3D]'s data as an array of [Image]s. Each [Image] represents a [i]slice[/i] of the [Texture3D], with different slices mapping to different depth (Z axis) levels.
</description>
</method>
<method name="get_depth" qualifiers="const">
<return type="int" />
<description>
+ Returns the [Texture3D]'s depth in pixels. Depth is typically represented by the Z axis (a dimension not present in [Texture2D]).
</description>
</method>
<method name="get_format" qualifiers="const">
<return type="int" enum="Image.Format" />
<description>
+ Returns the current format being used by this texture. See [enum Image.Format] for details.
</description>
</method>
<method name="get_height" qualifiers="const">
<return type="int" />
<description>
+ Returns the [Texture3D]'s height in pixels. Width is typically represented by the Y axis.
</description>
</method>
<method name="get_width" qualifiers="const">
<return type="int" />
<description>
+ Returns the [Texture3D]'s width in pixels. Width is typically represented by the X axis.
</description>
</method>
<method name="has_mipmaps" qualifiers="const">
<return type="bool" />
<description>
+ Returns [code]true[/code] if the [Texture3D] has generated mipmaps.
</description>
</method>
</methods>
diff --git a/doc/classes/TextureLayered.xml b/doc/classes/TextureLayered.xml
index 5e6afcbc5c..8f6dff7acf 100644
--- a/doc/classes/TextureLayered.xml
+++ b/doc/classes/TextureLayered.xml
@@ -4,12 +4,11 @@
Base class for texture types which contain the data of multiple [Image]s. Each image is of the same size and format.
</brief_description>
<description>
- Base class for [Texture2DArray], [Cubemap] and [CubemapArray]. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types.
+ Base class for [ImageTextureLayered]. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also [Texture3D].
Data is set on a per-layer basis. For [Texture2DArray]s, the layer specifies the array layer.
All images need to have the same width, height and number of mipmap levels.
- A [TextureLayered] can be loaded with [code]method ResourceFormatLoader.load[/code].
- To create such a texture file yourself, re-import your image files using the Godot Editor import presets.
- Internally, Godot maps these files to their respective counterparts in the target rendering driver (GLES3, Vulkan).
+ A [TextureLayered] can be loaded with [method ResourceLoader.load].
+ Internally, Godot maps these files to their respective counterparts in the target rendering driver (Vulkan, GLES3).
</description>
<tutorials>
</tutorials>
@@ -17,37 +16,44 @@
<method name="_get_format" qualifiers="virtual const">
<return type="int" enum="Image.Format" />
<description>
+ Called when the [TextureLayered]'s format is queried.
</description>
</method>
<method name="_get_height" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the the [TextureLayered]'s height is queried.
</description>
</method>
<method name="_get_layer_data" qualifiers="virtual const">
<return type="Image" />
<param index="0" name="layer_index" type="int" />
<description>
+ Called when the data for a layer in the [TextureLayered] is queried.
</description>
</method>
<method name="_get_layered_type" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the layers' type in the [TextureLayered] is queried.
</description>
</method>
<method name="_get_layers" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the number of layers in the [TextureLayered] is queried.
</description>
</method>
<method name="_get_width" qualifiers="virtual const">
<return type="int" />
<description>
+ Called when the [TextureLayered]'s width queried.
</description>
</method>
<method name="_has_mipmaps" qualifiers="virtual const">
<return type="bool" />
<description>
+ Called when the presence of mipmaps in the [TextureLayered] is queried.
</description>
</method>
<method name="get_format" qualifiers="const">
@@ -59,7 +65,7 @@
<method name="get_height" qualifiers="const">
<return type="int" />
<description>
- Returns the height of the texture. Height is typically represented by the Y-axis.
+ Returns the height of the texture in pixels. Height is typically represented by the Y axis.
</description>
</method>
<method name="get_layer_data" qualifiers="const">
@@ -72,6 +78,7 @@
<method name="get_layered_type" qualifiers="const">
<return type="int" enum="TextureLayered.LayeredType" />
<description>
+ Returns the [TextureLayered]'s type. The type determines how the data is accessed, with cubemaps having special types.
</description>
</method>
<method name="get_layers" qualifiers="const">
@@ -83,7 +90,7 @@
<method name="get_width" qualifiers="const">
<return type="int" />
<description>
- Returns the width of the texture. Width is typically represented by the X-axis.
+ Returns the width of the texture in pixels. Width is typically represented by the X axis.
</description>
</method>
<method name="has_mipmaps" qualifiers="const">
@@ -95,10 +102,13 @@
</methods>
<constants>
<constant name="LAYERED_TYPE_2D_ARRAY" value="0" enum="LayeredType">
+ Texture is a generic [Texture2DArray].
</constant>
<constant name="LAYERED_TYPE_CUBEMAP" value="1" enum="LayeredType">
+ Texture is a [Cubemap], with each side in its own layer (6 in total).
</constant>
<constant name="LAYERED_TYPE_CUBEMAP_ARRAY" value="2" enum="LayeredType">
+ Texture is a [CubemapArray], with each cubemap being made of 6 layers.
</constant>
</constants>
</class>
diff --git a/doc/classes/TextureProgressBar.xml b/doc/classes/TextureProgressBar.xml
index fcdb18e10d..54b77bf5eb 100644
--- a/doc/classes/TextureProgressBar.xml
+++ b/doc/classes/TextureProgressBar.xml
@@ -27,6 +27,7 @@
<member name="fill_mode" type="int" setter="set_fill_mode" getter="get_fill_mode" default="0">
The fill direction. See [enum FillMode] for possible values.
</member>
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="1" />
<member name="nine_patch_stretch" type="bool" setter="set_nine_patch_stretch" getter="get_nine_patch_stretch" default="false">
If [code]true[/code], Godot treats the bar's textures like in [NinePatchRect]. Use the [code]stretch_margin_*[/code] properties like [member stretch_margin_bottom] to set up the nine patch's 3×3 grid. When using a radial [member fill_mode], this setting will enable stretching.
</member>
@@ -40,6 +41,8 @@
<member name="radial_initial_angle" type="float" setter="set_radial_initial_angle" getter="get_radial_initial_angle" default="0.0">
Starting angle for the fill of [member texture_progress] if [member fill_mode] is [constant FILL_CLOCKWISE] or [constant FILL_COUNTER_CLOCKWISE]. When the node's [code]value[/code] is equal to its [code]min_value[/code], the texture doesn't show up at all. When the [code]value[/code] increases, the texture fills and tends towards [member radial_fill_degrees].
</member>
+ <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" />
+ <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="1.0" />
<member name="stretch_margin_bottom" type="int" setter="set_stretch_margin" getter="get_stretch_margin" default="0">
The height of the 9-patch's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders.
</member>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index 348184a16a..01246f0c2e 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -365,7 +365,7 @@
Show or hide the TileMap's collision shapes. If set to [constant VISIBILITY_MODE_DEFAULT], this depends on the show collision debug settings.
</member>
<member name="navigation_visibility_mode" type="int" setter="set_navigation_visibility_mode" getter="get_navigation_visibility_mode" enum="TileMap.VisibilityMode" default="0">
- Show or hide the TileMap's collision shapes. If set to [constant VISIBILITY_MODE_DEFAULT], this depends on the show navigation debug settings.
+ Show or hide the TileMap's navigation meshes. If set to [constant VISIBILITY_MODE_DEFAULT], this depends on the show navigation debug settings.
</member>
<member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset">
The assigned [TileSet].
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index 7ced16d1af..5a24483774 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -7,7 +7,6 @@
A TileSet is a library of tiles for a [TileMap]. A TileSet handles a list of [TileSetSource], each of them storing a set of tiles.
Tiles can either be from a [TileSetAtlasSource], that render tiles out of a texture with support for physics, navigation, etc... or from a [TileSetScenesCollectionSource] which exposes scene-based tiles.
Tiles are referenced by using three IDs: their source ID, their atlas coordinates ID and their alternative tile ID.
-
A TileSet can be configured so that its tiles expose more or less properties. To do so, the TileSet resources uses property layers, that you can add or remove depending on your needs.
For example, adding a physics layer allows giving collision shapes to your tiles. Each layer having dedicated properties (physics layer an mask), you may add several TileSet physics layers for each type of collision you need.
See the functions to add new layers for more information.
diff --git a/doc/classes/TileSetAtlasSource.xml b/doc/classes/TileSetAtlasSource.xml
index df469cd030..5efc1da6f9 100644
--- a/doc/classes/TileSetAtlasSource.xml
+++ b/doc/classes/TileSetAtlasSource.xml
@@ -6,9 +6,7 @@
<description>
An atlas is a grid of tiles laid out on a texture. Each tile in the grid must be exposed using [method create_tile]. Those tiles are then indexed using their coordinates in the grid.
Each tile can also have a size in the grid coordinates, making it more or less cells in the atlas.
-
Alternatives version of a tile can be created using [method create_alternative_tile], which are then indexed using an alternative ID. The main tile (the one in the grid), is accessed with an alternative ID equal to 0.
-
Each tile alternate has a set of properties that is defined by the source's [TileSet] layers. Those properties are stored in a TileData object that can be accessed and modified using [method get_tile_data].
As TileData properties are stored directly in the TileSetAtlasSource resource, their properties might also be set using [code]TileSetAtlasSource.set("&lt;coords_x&gt;:&lt;coords_y&gt;/&lt;alternative_id&gt;/&lt;tile_data_property&gt;")[/code].
</description>
diff --git a/doc/classes/TileSetSource.xml b/doc/classes/TileSetSource.xml
index e88e725bf4..4ebd7735b0 100644
--- a/doc/classes/TileSetSource.xml
+++ b/doc/classes/TileSetSource.xml
@@ -7,7 +7,6 @@
Exposes a set of tiles for a [TileSet] resource.
Tiles in a source are indexed with two IDs, coordinates ID (of type Vector2i) and an alternative ID (of type int), named according to their use in the [TileSetAtlasSource] class.
Depending on the TileSet source type, those IDs might have restrictions on their values, this is why the base [TileSetSource] class only exposes getters for them.
-
You can iterate over all tiles exposed by a TileSetSource by first iterating over coordinates IDs using [method get_tiles_count] and [method get_tile_id], then over alternative IDs using [method get_alternative_tiles_count] and [method get_alternative_tile_id].
</description>
<tutorials>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index 905b3d77af..23d20a5a75 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -123,6 +123,12 @@
Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
</description>
</method>
+ <method name="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this transform is finite, by calling [method @GlobalScope.is_finite] on each component.
+ </description>
+ </method>
<method name="looking_at" qualifiers="const">
<return type="Transform2D" />
<param index="0" name="target" type="Vector2" default="Vector2(0, 0)" />
diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml
index 18b4f9e6f9..b3145ea022 100644
--- a/doc/classes/Transform3D.xml
+++ b/doc/classes/Transform3D.xml
@@ -82,6 +82,12 @@
Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
</description>
</method>
+ <method name="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this transform is finite, by calling [method @GlobalScope.is_finite] on each component.
+ </description>
+ </method>
<method name="looking_at" qualifiers="const">
<return type="Transform3D" />
<param index="0" name="target" type="Vector3" />
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="&quot;en&quot;">
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index 539ca38190..bf79821e2d 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -251,7 +251,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="min_width" type="int" />
<description>
- Overrides the calculated minimum width of a column. It can be set to `0` to restore the default behavior. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to [member Control.size_flags_stretch_ratio].
+ Overrides the calculated minimum width of a column. It can be set to [code]0[/code] to restore the default behavior. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to [member Control.size_flags_stretch_ratio].
</description>
</method>
<method name="set_column_expand">
@@ -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/TreeItem.xml b/doc/classes/TreeItem.xml
index c109dc57f7..a8ffef427f 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -425,6 +425,15 @@
Sets the given column's button [Texture2D] at index [param button_idx] to [param button].
</description>
</method>
+ <method name="set_button_color">
+ <return type="void" />
+ <param index="0" name="column" type="int" />
+ <param index="1" name="button_idx" type="int" />
+ <param index="2" name="color" type="Color" />
+ <description>
+ Sets the given column's button color at index [param button_idx] to [param color].
+ </description>
+ </method>
<method name="set_button_disabled">
<return type="void" />
<param index="0" name="column" type="int" />
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml
index acf900ae55..eef35049e5 100644
--- a/doc/classes/Tween.xml
+++ b/doc/classes/Tween.xml
@@ -177,7 +177,8 @@
<method name="parallel">
<return type="Tween" />
<description>
- Makes the next [Tweener] run parallelly to the previous one. Example:
+ Makes the next [Tweener] run parallelly to the previous one.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
var tween = create_tween()
@@ -272,7 +273,7 @@
<param index="0" name="callback" type="Callable" />
<description>
Creates and appends a [CallbackTweener]. This method can be used to call an arbitrary method in any object. Use [method Callable.bind] to bind additional arguments for the call.
- Example: object that keeps shooting every 1 second.
+ [b]Example:[/b] Object that keeps shooting every 1 second:
[codeblocks]
[gdscript]
var tween = get_tree().create_tween().set_loops()
@@ -283,7 +284,7 @@
tween.TweenCallback(new Callable(Shoot)).SetDelay(1.0f);
[/csharp]
[/codeblocks]
- Example: turning a sprite red and then blue, with 2 second delay.
+ [b]Example:[/b] Turning a sprite red and then blue, with 2 second delay:
[codeblocks]
[gdscript]
var tween = get_tree().create_tween()
@@ -304,7 +305,7 @@
<param index="0" name="time" type="float" />
<description>
Creates and appends an [IntervalTweener]. This method can be used to create delays in the tween animation, as an alternative to using the delay in other [Tweener]s, or when there's no animation (in which case the [Tween] acts as a timer). [param time] is the length of the interval, in seconds.
- Example: creating an interval in code execution.
+ [b]Example:[/b] Creating an interval in code execution:
[codeblocks]
[gdscript]
# ... some code
@@ -317,7 +318,7 @@
// ... more code
[/csharp]
[/codeblocks]
- Example: creating an object that moves back and forth and jumps every few seconds.
+ [b]Example:[/b] Creating an object that moves back and forth and jumps every few seconds:
[codeblocks]
[gdscript]
var tween = create_tween().set_loops()
@@ -348,7 +349,7 @@
<param index="3" name="duration" type="float" />
<description>
Creates and appends a [MethodTweener]. This method is similar to a combination of [method tween_callback] and [method tween_property]. It calls a method over time with a tweened value provided as an argument. The value is tweened between [param from] and [param to] over the time specified by [param duration], in seconds. Use [method Callable.bind] to bind additional arguments for the call. You can use [method MethodTweener.set_ease] and [method MethodTweener.set_trans] to tweak the easing and transition of the value or [method MethodTweener.set_delay] to delay the tweening.
- Example: making a 3D object look from one point to another point.
+ [b]Example:[/b] Making a 3D object look from one point to another point:
[codeblocks]
[gdscript]
var tween = create_tween()
@@ -359,7 +360,7 @@
tween.TweenMethod(new Callable(() =&gt; LookAt(Vector3.Up)), new Vector3(-1.0f, 0.0f, -1.0f), new Vector3(1.0f, 0.0f, -1.0f), 1.0f); // The LookAt() method takes up vector as second argument.
[/csharp]
[/codeblocks]
- Example: setting a text of a [Label], using an intermediate method and after a delay.
+ [b]Example:[/b] Setting the text of a [Label], using an intermediate method and after a delay:
[codeblocks]
[gdscript]
func _ready():
@@ -393,7 +394,8 @@
<param index="2" name="final_val" type="Variant" />
<param index="3" name="duration" type="float" />
<description>
- Creates and appends a [PropertyTweener]. This method tweens a [param property] of an [param object] between an initial value and [param final_val] in a span of time equal to [param duration], in seconds. The initial value by default is the property's value at the time the tweening of the [PropertyTweener] starts. For example:
+ Creates and appends a [PropertyTweener]. This method tweens a [param property] of an [param object] between an initial value and [param final_val] in a span of time equal to [param duration], in seconds. The initial value by default is the property's value at the time the tweening of the [PropertyTweener] starts.
+ [b]Example:[/b]
[codeblocks]
[gdscript]
var tween = create_tween()
@@ -408,7 +410,7 @@
[/codeblocks]
will move the sprite to position (100, 200) and then to (200, 300). If you use [method PropertyTweener.from] or [method PropertyTweener.from_current], the starting position will be overwritten by the given value instead. See other methods in [PropertyTweener] to see how the tweening can be tweaked further.
[b]Note:[/b] You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using [code]"property:component"[/code] (eg. [code]position:x[/code]), where it would only apply to that particular component.
- Example: moving object twice from the same position, with different transition types.
+ [b]Example:[/b] Moving an object twice from the same position, with different transition types:
[codeblocks]
[gdscript]
var tween = create_tween()
diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml
index b30349e538..488154106f 100644
--- a/doc/classes/VSlider.xml
+++ b/doc/classes/VSlider.xml
@@ -33,6 +33,7 @@
The background of the area below the grabber.
</theme_item>
<theme_item name="grabber_area_highlight" data_type="style" type="StyleBox">
+ The background of the area below the grabber, to the left of the grabber.
</theme_item>
<theme_item name="slider" data_type="style" type="StyleBox">
The background for the whole slider. Determines the width of the [code]grabber_area[/code].
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index e1852340c0..5590f82336 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -206,6 +206,12 @@
Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
+ <method name="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this vector is finite, by calling [method @GlobalScope.is_finite] on each component.
+ </description>
+ </method>
<method name="is_normalized" qualifiers="const">
<return type="bool" />
<description>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 1ef84050cd..1a2cdfe10e 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -174,10 +174,16 @@
Returns [code]true[/code] if this vector and [param to] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
+ <method name="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this vector is finite, by calling [method @GlobalScope.is_finite] on each component.
+ </description>
+ </method>
<method name="is_normalized" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the vector is normalized, [code]false[/code] otherwise.
+ Returns [code]true[/code] if the vector is [method normalized], [code]false[/code] otherwise.
</description>
</method>
<method name="is_zero_approx" qualifiers="const">
@@ -238,18 +244,22 @@
<method name="normalized" qualifiers="const">
<return type="Vector3" />
<description>
- Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code].
+ Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code]. See also [method is_normalized].
</description>
</method>
<method name="octahedron_decode" qualifiers="static">
<return type="Vector3" />
<param index="0" name="uv" type="Vector2" />
<description>
+ Returns the [Vector3] from an octahedral-compressed form created using [method octahedron_encode] (stored as a [Vector2]).
</description>
</method>
<method name="octahedron_encode" qualifiers="const">
<return type="Vector2" />
<description>
+ Returns the octahedral-encoded (oct32) form of this [Vector3] as a [Vector2]. Since a [Vector2] occupies 1/3 less memory compared to [Vector3], this form of compression can be used to pass greater amounts of [method normalized] [Vector3]s without increasing storage or memory requirements. See also [method octahedron_decode].
+ [b]Note:[/b] [method octahedron_encode] can only be used for [method normalized] vectors. [method octahedron_encode] does [i]not[/i] check whether this [Vector3] is normalized, and will return a value that does not decompress to the original value if the [Vector3] is not normalized.
+ [b]Note:[/b] Octahedral compression is [i]lossy[/i], although visual differences are rarely perceptible in real world scenarios.
</description>
</method>
<method name="outer" qualifiers="const">
diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml
index fdc93f82ec..662d0bce3a 100644
--- a/doc/classes/Vector4.xml
+++ b/doc/classes/Vector4.xml
@@ -135,6 +135,12 @@
Returns [code]true[/code] if this vector and [param with] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
</description>
</method>
+ <method name="is_finite" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this vector is finite, by calling [method @GlobalScope.is_finite] on each component.
+ </description>
+ </method>
<method name="is_normalized" qualifiers="const">
<return type="bool" />
<description>
diff --git a/doc/classes/Vector4i.xml b/doc/classes/Vector4i.xml
index 3eea93ce1f..e9ac5b9475 100644
--- a/doc/classes/Vector4i.xml
+++ b/doc/classes/Vector4i.xml
@@ -133,12 +133,20 @@
<return type="Vector4i" />
<param index="0" name="right" type="Vector4i" />
<description>
+ Gets the remainder of each component of the [Vector4i] with the components of the given [Vector4i]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
+ [codeblock]
+ print(Vector4i(10, -20, 30, -40) % Vector4i(7, 8, 9, 10)) # Prints "(3, -4, 3, 0)"
+ [/codeblock]
</description>
</operator>
<operator name="operator %">
<return type="Vector4i" />
<param index="0" name="right" type="int" />
<description>
+ Gets the remainder of each component of the [Vector4i] with the the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.
+ [codeblock]
+ print(Vector4i(10, -20, 30, -40) % 7) # Prints "(3, -6, 2, -5)"
+ [/codeblock]
</description>
</operator>
<operator name="operator *">
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 998e782975..78013a8f4b 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -45,6 +45,13 @@
Returns the currently active 3D camera.
</description>
</method>
+ <method name="get_canvas_cull_mask_bit" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="layer" type="int" />
+ <description>
+ Returns an individual bit on the rendering layer mask.
+ </description>
+ </method>
<method name="get_final_transform" qualifiers="const">
<return type="Transform2D" />
<description>
@@ -71,6 +78,12 @@
<description>
</description>
</method>
+ <method name="get_screen_transform" qualifiers="const">
+ <return type="Transform2D" />
+ <description>
+ Returns the transform from the Viewport's coordinates to the screen coordinates of the containing window manager window.
+ </description>
+ </method>
<method name="get_texture" qualifiers="const">
<return type="ViewportTexture" />
<description>
@@ -170,6 +183,14 @@
If none of the methods handle the event and [member physics_object_picking] is [code]true[/code], the event is used for physics object picking.
</description>
</method>
+ <method name="set_canvas_cull_mask_bit">
+ <return type="void" />
+ <param index="0" name="layer" type="int" />
+ <param index="1" name="enable" type="bool" />
+ <description>
+ Set/clear individual bits on the rendering layer mask. This simplifies editing this [Viewport]'s layers.
+ </description>
+ </method>
<method name="set_input_as_handled">
<return type="void" />
<description>
@@ -199,6 +220,9 @@
<member name="audio_listener_enable_3d" type="bool" setter="set_as_audio_listener_3d" getter="is_audio_listener_3d" default="false">
If [code]true[/code], the viewport will process 3D audio streams.
</member>
+ <member name="canvas_cull_mask" type="int" setter="set_canvas_cull_mask" getter="get_canvas_cull_mask" default="4294967295">
+ The rendering layers in which this [Viewport] renders [CanvasItem] nodes.
+ </member>
<member name="canvas_item_default_texture_filter" type="int" setter="set_default_canvas_item_texture_filter" getter="get_default_canvas_item_texture_filter" enum="Viewport.DefaultCanvasItemTextureFilter" default="1">
Sets the default filter mode used by [CanvasItem]s in this Viewport. See [enum DefaultCanvasItemTextureFilter] for options.
</member>
@@ -300,6 +324,8 @@
If [code]true[/code], the viewport should render its background as transparent.
</member>
<member name="use_debanding" type="bool" setter="set_use_debanding" getter="is_using_debanding" default="false">
+ If [code]true[/code], uses a fast post-processing filter to make banding significantly less visible in 3D. 2D rendering is [i]not[/i] affected by debanding unless the [member Environment.background_mode] is [constant Environment.BG_CANVAS]. See also [member ProjectSettings.rendering/anti_aliasing/quality/use_debanding].
+ In some cases, debanding may introduce a slightly noticeable dithering pattern. It's recommended to enable debanding only when actually needed since the dithering pattern will make lossless-compressed screenshots larger.
</member>
<member name="use_occlusion_culling" type="bool" setter="set_use_occlusion_culling" getter="is_using_occlusion_culling" default="false">
If [code]true[/code], [OccluderInstance3D] nodes will be usable for occlusion culling in 3D for this viewport. For the root viewport, [member ProjectSettings.rendering/occlusion_culling/use_occlusion_culling] must be set to [code]true[/code] instead.
diff --git a/doc/classes/ViewportTexture.xml b/doc/classes/ViewportTexture.xml
index 87de664aad..6bd64a50bb 100644
--- a/doc/classes/ViewportTexture.xml
+++ b/doc/classes/ViewportTexture.xml
@@ -6,6 +6,7 @@
<description>
Displays the content of a [Viewport] node as a dynamic [Texture2D]. This can be used to mix controls, 2D, and 3D elements in the same scene.
To create a ViewportTexture in code, use the [method Viewport.get_texture] method on the target viewport.
+ [b]Note:[/b] When local to scene, this texture uses [method Resource.setup_local_to_scene] to set the proxy texture and flags in the local viewport.
</description>
<tutorials>
<link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link>
diff --git a/doc/classes/VisibleOnScreenEnabler2D.xml b/doc/classes/VisibleOnScreenEnabler2D.xml
index 50d0c00017..8590e9cc9f 100644
--- a/doc/classes/VisibleOnScreenEnabler2D.xml
+++ b/doc/classes/VisibleOnScreenEnabler2D.xml
@@ -1,23 +1,30 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisibleOnScreenEnabler2D" inherits="VisibleOnScreenNotifier2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Automatically disables another node if not visible on screen.
</brief_description>
<description>
+ VisibleOnScreenEnabler2D detects when it is visible on screen (just like [VisibleOnScreenNotifier2D]) and automatically enables or disables the target node. The target node is disabled when [VisibleOnScreenEnabler2D] is not visible on screen (including when [member CanvasItem.visible] is [code]false[/code]), and enabled when the enabler is visible. The disabling is achieved by changing [member Node.process_mode].
</description>
<tutorials>
</tutorials>
<members>
<member name="enable_mode" type="int" setter="set_enable_mode" getter="get_enable_mode" enum="VisibleOnScreenEnabler2D.EnableMode" default="0">
+ Determines how the node is enabled. Corresponds to [enum Node.ProcessMode]. Disabled node uses [constant Node.PROCESS_MODE_DISABLED].
</member>
<member name="enable_node_path" type="NodePath" setter="set_enable_node_path" getter="get_enable_node_path" default="NodePath(&quot;..&quot;)">
+ The path to the target node, relative to the [VisibleOnScreenEnabler2D]. The target node is cached; it's only assigned when setting this property (if the [VisibleOnScreenEnabler2D] is inside scene tree) and every time the [VisibleOnScreenEnabler2D] enters the scene tree. If the path is invalid, nothing will happen.
</member>
</members>
<constants>
<constant name="ENABLE_MODE_INHERIT" value="0" enum="EnableMode">
+ Corresponds to [constant Node.PROCESS_MODE_INHERIT].
</constant>
<constant name="ENABLE_MODE_ALWAYS" value="1" enum="EnableMode">
+ Corresponds to [constant Node.PROCESS_MODE_ALWAYS].
</constant>
<constant name="ENABLE_MODE_WHEN_PAUSED" value="2" enum="EnableMode">
+ Corresponds to [constant Node.PROCESS_MODE_WHEN_PAUSED.
</constant>
</constants>
</class>
diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml
index 9574686506..31811f817b 100644
--- a/doc/classes/VisualInstance3D.xml
+++ b/doc/classes/VisualInstance3D.xml
@@ -17,7 +17,7 @@
<method name="get_aabb" qualifiers="const">
<return type="AABB" />
<description>
- Returns the [AABB] (also known as the bounding box) for this [VisualInstance3D]. See also [method get_transformed_aabb].
+ Returns the [AABB] (also known as the bounding box) for this [VisualInstance3D].
</description>
</method>
<method name="get_base" qualifiers="const">
@@ -39,13 +39,6 @@
Returns whether or not the specified layer of the [member layers] is enabled, given a [code]layer_number[/code] between 1 and 20.
</description>
</method>
- <method name="get_transformed_aabb" qualifiers="const">
- <return type="AABB" />
- <description>
- Returns the transformed [AABB] (also known as the bounding box) for this [VisualInstance3D].
- Transformed in this case means the [AABB] plus the position, rotation, and scale of the [Node3D]'s [Transform3D]. See also [method get_aabb].
- </description>
- </method>
<method name="set_base">
<return type="void" />
<param index="0" name="base" type="RID" />
@@ -63,7 +56,7 @@
</method>
</methods>
<members>
- <member name="layers" type="int" setter="set_layer_mask" getter="get_layer_mask">
+ <member name="layers" type="int" setter="set_layer_mask" getter="get_layer_mask" default="1">
The render layer(s) this [VisualInstance3D] is drawn on.
This object will only be visible for [Camera3D]s whose cull mask includes the render object this [VisualInstance3D] is set to.
For [Light3D]s, this can be used to control which [VisualInstance3D]s are affected by a specific light. For [GPUParticles3D], this can be used to control which particles are effected by a specific attractor. For [Decal]s, this can be used to control which [VisualInstance3D]s are affected by a specific decal.
diff --git a/doc/classes/VisualShaderNodeFloatParameter.xml b/doc/classes/VisualShaderNodeFloatParameter.xml
index c0fd88294a..3b5bf57b4d 100644
--- a/doc/classes/VisualShaderNodeFloatParameter.xml
+++ b/doc/classes/VisualShaderNodeFloatParameter.xml
@@ -16,7 +16,7 @@
Enables usage of the [member default_value].
</member>
<member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeFloatParameter.Hint" default="0">
- A hint applied to the uniform, which controls the values it can take when set through the inspector.
+ A hint applied to the uniform, which controls the values it can take when set through the Inspector.
</member>
<member name="max" type="float" setter="set_max" getter="get_max" default="1.0">
Minimum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP].
diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml
index 6268a3fe09..2ebffcfe76 100644
--- a/doc/classes/VisualShaderNodeInput.xml
+++ b/doc/classes/VisualShaderNodeInput.xml
@@ -19,7 +19,7 @@
</methods>
<members>
<member name="input_name" type="String" setter="set_input_name" getter="get_input_name" default="&quot;[None]&quot;">
- One of the several input constants in lower-case style like: "vertex"([code]VERTEX[/code]) or "point_size"([code]POINT_SIZE[/code]).
+ One of the several input constants in lower-case style like: "vertex" ([code]VERTEX[/code]) or "point_size" ([code]POINT_SIZE[/code]).
</member>
</members>
<signals>
diff --git a/doc/classes/VisualShaderNodeParameter.xml b/doc/classes/VisualShaderNodeParameter.xml
index c66022f77d..55b10ac810 100644
--- a/doc/classes/VisualShaderNodeParameter.xml
+++ b/doc/classes/VisualShaderNodeParameter.xml
@@ -4,7 +4,7 @@
A base type for the parameters within the visual shader graph.
</brief_description>
<description>
- A parameter represents a variable in the shader which is set externally, i.e. from the [ShaderMaterial]. Parameters are exposed as properties in the [ShaderMaterial] and can be assigned from the inspector or from a script.
+ A parameter represents a variable in the shader which is set externally, i.e. from the [ShaderMaterial]. Parameters are exposed as properties in the [ShaderMaterial] and can be assigned from the Inspector or from a script.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/VoxelGIData.xml b/doc/classes/VoxelGIData.xml
index 92b2e66e5a..bd9df18394 100644
--- a/doc/classes/VoxelGIData.xml
+++ b/doc/classes/VoxelGIData.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
[VoxelGIData] contains baked voxel global illumination for use in a [VoxelGI] node. [VoxelGIData] also offers several properties to adjust the final appearance of the global illumination. These properties can be adjusted at run-time without having to bake the [VoxelGI] node again.
- [b]Note:[/b] To prevent text-based scene files ([code].tscn[/code]) from growing too much and becoming slow to load and save, always save [VoxelGIData] to an external binary resource file ([code].res[/code]) instead of embedding it within the scene. This can be done by clicking the dropdown arrow next to the [VoxelGIData] resource, choosing [b]Edit[/b], clicking the floppy disk icon at the top of the inspector then choosing [b]Save As...[/b].
+ [b]Note:[/b] To prevent text-based scene files ([code].tscn[/code]) from growing too much and becoming slow to load and save, always save [VoxelGIData] to an external binary resource file ([code].res[/code]) instead of embedding it within the scene. This can be done by clicking the dropdown arrow next to the [VoxelGIData] resource, choosing [b]Edit[/b], clicking the floppy disk icon at the top of the Inspector then choosing [b]Save As...[/b].
</description>
<tutorials>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
index c278f7031f..8707ef003a 100644
--- a/doc/classes/Window.xml
+++ b/doc/classes/Window.xml
@@ -491,7 +491,7 @@
Minimized window mode, i.e. [Window] is not visible and available on window manager's window list. Normally happens when the minimize button is pressed.
</constant>
<constant name="MODE_MAXIMIZED" value="2" enum="Mode">
- Maximized window mode, i.e. [Window] will occupy whole screen area except task bar and still display its borders. Normally happens when the minimize button is pressed.
+ Maximized window mode, i.e. [Window] will occupy whole screen area except task bar and still display its borders. Normally happens when the maximize button is pressed.
</constant>
<constant name="MODE_FULLSCREEN" value="3" enum="Mode">
Full screen window mode. Note that this is not [i]exclusive[/i] full screen. On Windows and Linux, a borderless window is used to emulate full screen. On macOS, a new desktop is used to display the running project.
diff --git a/doc/classes/XRInterface.xml b/doc/classes/XRInterface.xml
index 3e48b8284a..05d5eb6673 100644
--- a/doc/classes/XRInterface.xml
+++ b/doc/classes/XRInterface.xml
@@ -32,7 +32,17 @@
<method name="get_play_area" qualifiers="const">
<return type="PackedVector3Array" />
<description>
- Returns an array of vectors that denotes the physical play area mapped to the virtual space around the [XROrigin3D] point. The points form a convex polygon that can be used to react to or visualise the play area. This returns an empty array if this feature is not supported or if the information is not yet available.
+ Returns an array of vectors that denotes the physical play area mapped to the virtual space around the [XROrigin3D] point. The points form a convex polygon that can be used to react to or visualize the play area. This returns an empty array if this feature is not supported or if the information is not yet available.
+ </description>
+ </method>
+ <method name="get_projection_for_view">
+ <return type="Projection" />
+ <param index="0" name="view" type="int" />
+ <param index="1" name="aspect" type="float" />
+ <param index="2" name="near" type="float" />
+ <param index="3" name="far" type="float" />
+ <description>
+ Returns the projection matrix for a view/eye.
</description>
</method>
<method name="get_render_target_size">
@@ -47,6 +57,16 @@
If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking.
</description>
</method>
+ <method name="get_transform_for_view">
+ <return type="Transform3D" />
+ <param index="0" name="view" type="int" />
+ <param index="1" name="cam_transform" type="Transform3D" />
+ <description>
+ Returns the transform for a view/eye.
+ [param view] is the view/eye index.
+ [param cam_transform] is the transform that maps device coordinates to scene coordinates, typically the global_transform of the current XROrigin3D.
+ </description>
+ </method>
<method name="get_view_count">
<return type="int" />
<description>
@@ -66,7 +86,7 @@
<method name="is_initialized" qualifiers="const">
<return type="bool" />
<description>
- Is [code]true[/code] if this interface has been initialised.
+ Is [code]true[/code] if this interface has been initialized.
</description>
</method>
<method name="is_passthrough_enabled">
diff --git a/doc/classes/XRInterfaceExtension.xml b/doc/classes/XRInterfaceExtension.xml
index 5958999037..0fe54e947f 100644
--- a/doc/classes/XRInterfaceExtension.xml
+++ b/doc/classes/XRInterfaceExtension.xml
@@ -138,14 +138,7 @@
<method name="_is_initialized" qualifiers="virtual const">
<return type="bool" />
<description>
- Returns [code]true[/code] if this interface has been initialised.
- </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.
+ Returns [code]true[/code] if this interface has been initialized.
</description>
</method>
<method name="_post_draw_viewport" qualifiers="virtual">
diff --git a/doc/classes/XROrigin3D.xml b/doc/classes/XROrigin3D.xml
index 7acee097e7..506d0fce41 100644
--- a/doc/classes/XROrigin3D.xml
+++ b/doc/classes/XROrigin3D.xml
@@ -13,6 +13,9 @@
<link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link>
</tutorials>
<members>
+ <member name="current" type="bool" setter="set_current" getter="is_current" default="false">
+ Is this XROrigin3D node the current origin used by the [XRServer]?
+ </member>
<member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale" default="1.0">
Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter.
[b]Note:[/b] This method is a passthrough to the [XRServer] itself.
diff --git a/doc/classes/XRPose.xml b/doc/classes/XRPose.xml
index 0e58fab9b3..31a484ea40 100644
--- a/doc/classes/XRPose.xml
+++ b/doc/classes/XRPose.xml
@@ -30,7 +30,7 @@
<member name="name" type="StringName" setter="set_name" getter="get_name" default="&amp;&quot;&quot;">
The name of this pose. Pose names are often driven by an action map setup by the user. Godot does suggest a number of pose names that it expects [XRInterface]s to implement:
- [code]root[/code] defines a root location, often used for tracked objects that do not have further nodes.
- - [code]aim[/code] defines the tip of a controller with the orientation pointing outwards, for instance: add your raycasts to this.
+ - [code]aim[/code] defines the tip of a controller with the orientation pointing outwards, for example: add your raycasts to this.
- [code]grip[/code] defines the location where the user grips the controller
- [code]skeleton[/code] defines the root location a hand mesh should be placed when using hand tracking and the animated skeleton supplied by the XR runtime.
</member>
@@ -46,7 +46,7 @@
No tracking information is available for this pose.
</constant>
<constant name="XR_TRACKING_CONFIDENCE_LOW" value="1" enum="TrackingConfidence">
- Tracking information may be inaccurate or estimated. For instance with inside out tracking this would indicate a controller may be (partially) obscured.
+ Tracking information may be inaccurate or estimated. For example, with inside out tracking this would indicate a controller may be (partially) obscured.
</constant>
<constant name="XR_TRACKING_CONFIDENCE_HIGH" value="2" enum="TrackingConfidence">
Tracking information is deemed accurate and up to date.
diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml
index 48b00323d3..d940ea41ac 100644
--- a/doc/classes/XRServer.xml
+++ b/doc/classes/XRServer.xml
@@ -30,18 +30,18 @@
<param index="1" name="keep_height" type="bool" />
<description>
This is an important function to understand correctly. AR and VR platforms all handle positioning slightly differently.
- For platforms that do not offer spatial tracking, our origin point (0,0,0) is the location of our HMD, but you have little control over the direction the player is facing in the real world.
+ For platforms that do not offer spatial tracking, our origin point (0, 0, 0) is the location of our HMD, but you have little control over the direction the player is facing in the real world.
For platforms that do offer spatial tracking, our origin point depends very much on the system. For OpenVR, our origin point is usually the center of the tracking space, on the ground. For other platforms, it's often the location of the tracking camera.
This method allows you to center your tracker on the location of the HMD. It will take the current location of the HMD and use that to adjust all your tracking data; in essence, realigning the real world to your player's current position in the game world.
For this method to produce usable results, tracking information must be available. This often takes a few frames after starting your game.
- You should call this method after a few seconds have passed. For instance, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, or when implementing a teleport mechanism.
+ You should call this method after a few seconds have passed. For example, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, or when implementing a teleport mechanism.
</description>
</method>
<method name="find_interface" qualifiers="const">
<return type="XRInterface" />
<param index="0" name="name" type="String" />
<description>
- Finds an interface by its [param name]. For instance, if your project uses capabilities of an AR/VR platform, you can find the interface for that platform by name and initialize it.
+ Finds an interface by its [param name]. For example, if your project uses capabilities of an AR/VR platform, you can find the interface for that platform by name and initialize it.
</description>
</method>
<method name="get_hmd_transform">
diff --git a/doc/classes/float.xml b/doc/classes/float.xml
index 9d685b9cd0..e3938fb5d5 100644
--- a/doc/classes/float.xml
+++ b/doc/classes/float.xml
@@ -114,12 +114,17 @@
<return type="Vector4" />
<param index="0" name="right" type="Vector4" />
<description>
+ Multiplies each component of the [Vector4] by the given [float].
</description>
</operator>
<operator name="operator *">
<return type="Vector4" />
<param index="0" name="right" type="Vector4i" />
<description>
+ Multiplies each component of the [Vector4i] by the given [float]. Returns a [Vector4].
+ [codeblock]
+ print(0.9 * Vector4i(10, 15, 20, -10)) # Prints "(9, 13.5, 18, -9)"
+ [/codeblock]
</description>
</operator>
<operator name="operator *">
@@ -140,12 +145,20 @@
<return type="float" />
<param index="0" name="right" type="float" />
<description>
+ Raises a [float] to a power of a [float].
+ [codeblock]
+ print(39.0625**0.25) # 2.5
+ [/codeblock]
</description>
</operator>
<operator name="operator **">
<return type="float" />
<param index="0" name="right" type="int" />
<description>
+ Raises a [float] to a power of an [int]. The result is a [float].
+ [codeblock]
+ print(0.9**3) # 0.729
+ [/codeblock]
</description>
</operator>
<operator name="operator +">
@@ -194,7 +207,7 @@
<return type="bool" />
<param index="0" name="right" type="float" />
<description>
- Returns [code]true[/code] the left float is less than the right one.
+ Returns [code]true[/code] if the left float is less than the right one.
</description>
</operator>
<operator name="operator &lt;">
@@ -208,7 +221,7 @@
<return type="bool" />
<param index="0" name="right" type="float" />
<description>
- Returns [code]true[/code] the left integer is less than or equal to the right one.
+ Returns [code]true[/code] if the left float is less than or equal to the right one.
</description>
</operator>
<operator name="operator &lt;=">
@@ -237,7 +250,7 @@
<return type="bool" />
<param index="0" name="right" type="float" />
<description>
- Returns [code]true[/code] the left float is greater than the right one.
+ Returns [code]true[/code] if the left float is greater than the right one.
</description>
</operator>
<operator name="operator &gt;">
@@ -251,7 +264,7 @@
<return type="bool" />
<param index="0" name="right" type="float" />
<description>
- Returns [code]true[/code] the left float is greater than or equal to the right one.
+ Returns [code]true[/code] if the left float is greater than or equal to the right one.
</description>
</operator>
<operator name="operator &gt;=">
diff --git a/doc/classes/int.xml b/doc/classes/int.xml
index 78e2e7d18f..65ab5d4656 100644
--- a/doc/classes/int.xml
+++ b/doc/classes/int.xml
@@ -72,14 +72,14 @@
<return type="bool" />
<param index="0" name="right" type="float" />
<description>
- Returns [code]true[/code] if operands are different from each other.
+ Returns [code]true[/code] if this [int] is not equivalent to the given [float].
</description>
</operator>
<operator name="operator !=">
<return type="bool" />
<param index="0" name="right" type="int" />
<description>
- Returns [code]true[/code] if operands are different from each other.
+ Returns [code]true[/code] if the integers are not equal.
</description>
</operator>
<operator name="operator %">
@@ -161,12 +161,14 @@
<return type="Vector4" />
<param index="0" name="right" type="Vector4" />
<description>
+ Multiplies each component of the [Vector4] by the given [int].
</description>
</operator>
<operator name="operator *">
<return type="Vector4i" />
<param index="0" name="right" type="Vector4i" />
<description>
+ Multiplies each component of the [Vector4i] by the given [int].
</description>
</operator>
<operator name="operator *">
@@ -187,19 +189,20 @@
<return type="float" />
<param index="0" name="right" type="float" />
<description>
+ Raises an [int] to a power of a [float]. The result is a [float].
+ [codeblock]
+ print(8**0.25) # 1.68179283050743
+ [/codeblock]
</description>
</operator>
<operator name="operator **">
<return type="int" />
<param index="0" name="right" type="int" />
<description>
- </description>
- </operator>
- <operator name="operator +">
- <return type="String" />
- <param index="0" name="right" type="String" />
- <description>
- Adds Unicode character with code [int] to the [String].
+ Raises an [int] to a power of a [int].
+ [codeblock]
+ print(5**5) # 3125
+ [/codeblock]
</description>
</operator>
<operator name="operator +">
@@ -262,7 +265,7 @@
<return type="bool" />
<param index="0" name="right" type="int" />
<description>
- Returns [code]true[/code] the left integer is less than the right one.
+ Returns [code]true[/code] if the left integer is less than the right one.
</description>
</operator>
<operator name="operator &lt;&lt;">
@@ -287,7 +290,7 @@
<return type="bool" />
<param index="0" name="right" type="int" />
<description>
- Returns [code]true[/code] the left integer is less than or equal to the right one.
+ Returns [code]true[/code] if the left integer is less than or equal to the right one.
</description>
</operator>
<operator name="operator ==">
@@ -315,7 +318,7 @@
<return type="bool" />
<param index="0" name="right" type="int" />
<description>
- Returns [code]true[/code] the left integer is greater than the right one.
+ Returns [code]true[/code] if the left integer is greater than the right one.
</description>
</operator>
<operator name="operator &gt;=">
@@ -329,7 +332,7 @@
<return type="bool" />
<param index="0" name="right" type="int" />
<description>
- Returns [code]true[/code] the left integer is greater than or equal to the right one.
+ Returns [code]true[/code] if the left integer is greater than or equal to the right one.
</description>
</operator>
<operator name="operator &gt;&gt;">