summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/AABB.xml2
-rw-r--r--doc/classes/AESContext.xml43
-rw-r--r--doc/classes/AStar.xml89
-rw-r--r--doc/classes/AStar2D.xml72
-rw-r--r--doc/classes/AcceptDialog.xml1
-rw-r--r--doc/classes/AnimatedSprite2D.xml1
-rw-r--r--doc/classes/Animation.xml26
-rw-r--r--doc/classes/AnimationNodeAdd3.xml1
-rw-r--r--doc/classes/AnimationNodeAnimation.xml2
-rw-r--r--doc/classes/AnimationNodeBlend2.xml2
-rw-r--r--doc/classes/AnimationNodeBlendSpace2D.xml1
-rw-r--r--doc/classes/AnimationNodeOneShot.xml1
-rw-r--r--doc/classes/AnimationNodeOutput.xml2
-rw-r--r--doc/classes/AnimationNodeStateMachine.xml10
-rw-r--r--doc/classes/AnimationNodeStateMachinePlayback.xml10
-rw-r--r--doc/classes/AnimationNodeStateMachineTransition.xml11
-rw-r--r--doc/classes/AnimationNodeTimeScale.xml1
-rw-r--r--doc/classes/AnimationNodeTransition.xml2
-rw-r--r--doc/classes/AnimationPlayer.xml2
-rw-r--r--doc/classes/AnimationTree.xml2
-rw-r--r--doc/classes/Area2D.xml3
-rw-r--r--doc/classes/Area3D.xml2
-rw-r--r--doc/classes/Array.xml75
-rw-r--r--doc/classes/ArrayMesh.xml25
-rw-r--r--doc/classes/AudioEffect.xml1
-rw-r--r--doc/classes/AudioEffectHighShelfFilter.xml2
-rw-r--r--doc/classes/AudioEffectLowShelfFilter.xml2
-rw-r--r--doc/classes/AudioEffectRecord.xml1
-rw-r--r--doc/classes/AudioEffectReverb.xml1
-rw-r--r--doc/classes/AudioServer.xml3
-rw-r--r--doc/classes/AudioStream.xml3
-rw-r--r--doc/classes/AudioStreamGenerator.xml2
-rw-r--r--doc/classes/AudioStreamPlayback.xml1
-rw-r--r--doc/classes/AudioStreamPlayer.xml5
-rw-r--r--doc/classes/BaseMaterial3D.xml7
-rw-r--r--doc/classes/Basis.xml5
-rw-r--r--doc/classes/BoxShape3D.xml3
-rw-r--r--doc/classes/Button.xml23
-rw-r--r--doc/classes/Callable.xml21
-rw-r--r--doc/classes/Camera2D.xml3
-rw-r--r--doc/classes/Camera3D.xml1
-rw-r--r--doc/classes/CanvasItem.xml33
-rw-r--r--doc/classes/CanvasLayer.xml1
-rw-r--r--doc/classes/CapsuleShape3D.xml1
-rw-r--r--doc/classes/CharFXTransform.xml11
-rw-r--r--doc/classes/CheckBox.xml1
-rw-r--r--doc/classes/CheckButton.xml1
-rw-r--r--doc/classes/CollisionShape2D.xml3
-rw-r--r--doc/classes/CollisionShape3D.xml3
-rw-r--r--doc/classes/Color.xml254
-rw-r--r--doc/classes/ColorPicker.xml1
-rw-r--r--doc/classes/ColorPickerButton.xml3
-rw-r--r--doc/classes/ColorRect.xml10
-rw-r--r--doc/classes/ConcavePolygonShape3D.xml1
-rw-r--r--doc/classes/ConfigFile.xml22
-rw-r--r--doc/classes/ConfirmationDialog.xml9
-rw-r--r--doc/classes/Control.xml220
-rw-r--r--doc/classes/ConvexPolygonShape3D.xml1
-rw-r--r--doc/classes/Crypto.xml55
-rw-r--r--doc/classes/CylinderShape3D.xml3
-rw-r--r--doc/classes/Dictionary.xml2
-rw-r--r--doc/classes/DisplayServer.xml12
-rw-r--r--doc/classes/DynamicFont.xml11
-rw-r--r--doc/classes/DynamicFontData.xml1
-rw-r--r--doc/classes/EditorImportPlugin.xml4
-rw-r--r--doc/classes/EditorInterface.xml4
-rw-r--r--doc/classes/EditorNode3DGizmoPlugin.xml2
-rw-r--r--doc/classes/Environment.xml3
-rw-r--r--doc/classes/File.xml10
-rw-r--r--doc/classes/FuncRef.xml30
-rw-r--r--doc/classes/GIProbe.xml1
-rw-r--r--doc/classes/GIProbeData.xml1
-rw-r--r--doc/classes/GPUParticles2D.xml1
-rw-r--r--doc/classes/GPUParticles3D.xml1
-rw-r--r--doc/classes/GridContainer.xml1
-rw-r--r--doc/classes/Input.xml2
-rw-r--r--doc/classes/InputEvent.xml2
-rw-r--r--doc/classes/InputEventAction.xml2
-rw-r--r--doc/classes/InputEventMouseMotion.xml1
-rw-r--r--doc/classes/Joint3D.xml1
-rw-r--r--doc/classes/KinematicBody2D.xml16
-rw-r--r--doc/classes/KinematicBody3D.xml18
-rw-r--r--doc/classes/Label.xml1
-rw-r--r--doc/classes/Light3D.xml1
-rw-r--r--doc/classes/Line2D.xml2
-rw-r--r--doc/classes/LinkButton.xml1
-rw-r--r--doc/classes/Material.xml2
-rw-r--r--doc/classes/MenuButton.xml1
-rw-r--r--doc/classes/Mesh.xml4
-rw-r--r--doc/classes/MeshInstance3D.xml4
-rw-r--r--doc/classes/MeshLibrary.xml2
-rw-r--r--doc/classes/Navigation2D.xml1
-rw-r--r--doc/classes/Navigation3D.xml1
-rw-r--r--doc/classes/NavigationMesh.xml1
-rw-r--r--doc/classes/NavigationPolygon.xml1
-rw-r--r--doc/classes/NavigationServer2D.xml1
-rw-r--r--doc/classes/NavigationServer3D.xml1
-rw-r--r--doc/classes/NetworkedMultiplayerPeer.xml1
-rw-r--r--doc/classes/NinePatchRect.xml6
-rw-r--r--doc/classes/Node.xml1
-rw-r--r--doc/classes/Node2D.xml1
-rw-r--r--doc/classes/Node3D.xml20
-rw-r--r--doc/classes/NodePath.xml1
-rw-r--r--doc/classes/OS.xml8
-rw-r--r--doc/classes/OptionButton.xml1
-rw-r--r--doc/classes/PackedScene.xml1
-rw-r--r--doc/classes/PackedStringArray.xml1
-rw-r--r--doc/classes/PackedVector2Array.xml1
-rw-r--r--doc/classes/Panel.xml3
-rw-r--r--doc/classes/PanelContainer.xml1
-rw-r--r--doc/classes/ProjectSettings.xml6
-rw-r--r--doc/classes/QuadMesh.xml2
-rw-r--r--doc/classes/Quat.xml1
-rw-r--r--doc/classes/RayCast3D.xml1
-rw-r--r--doc/classes/Rect2.xml2
-rw-r--r--doc/classes/Rect2i.xml1
-rw-r--r--doc/classes/RectangleShape2D.xml2
-rw-r--r--doc/classes/ResourceLoader.xml5
-rw-r--r--doc/classes/RichTextLabel.xml2
-rw-r--r--doc/classes/RigidBody2D.xml4
-rw-r--r--doc/classes/RigidBody3D.xml2
-rw-r--r--doc/classes/Skeleton3D.xml2
-rw-r--r--doc/classes/SkeletonIK3D.xml1
-rw-r--r--doc/classes/SphereShape3D.xml1
-rw-r--r--doc/classes/SpotLight3D.xml1
-rw-r--r--doc/classes/Sprite2D.xml1
-rw-r--r--doc/classes/Sprite3D.xml3
-rw-r--r--doc/classes/SpriteBase3D.xml12
-rw-r--r--doc/classes/StaticBody3D.xml3
-rw-r--r--doc/classes/String.xml18
-rw-r--r--doc/classes/SubViewport.xml9
-rw-r--r--doc/classes/SurfaceTool.xml1
-rw-r--r--doc/classes/TextureButton.xml2
-rw-r--r--doc/classes/TextureRect.xml1
-rw-r--r--doc/classes/Thread.xml1
-rw-r--r--doc/classes/TileMap.xml6
-rw-r--r--doc/classes/TileSet.xml7
-rw-r--r--doc/classes/Timer.xml1
-rw-r--r--doc/classes/Transform.xml3
-rw-r--r--doc/classes/Transform2D.xml3
-rw-r--r--doc/classes/VBoxContainer.xml1
-rw-r--r--doc/classes/Vector2.xml7
-rw-r--r--doc/classes/Vector2i.xml2
-rw-r--r--doc/classes/Vector3.xml7
-rw-r--r--doc/classes/Vector3i.xml2
-rw-r--r--doc/classes/VehicleBody3D.xml1
-rw-r--r--doc/classes/VehicleWheel3D.xml1
-rw-r--r--doc/classes/Viewport.xml6
-rw-r--r--doc/classes/ViewportTexture.xml4
-rw-r--r--doc/classes/VisibilityNotifier2D.xml1
-rw-r--r--doc/classes/VisualShaderNodeMultiplyAdd.xml10
-rw-r--r--doc/classes/WorldEnvironment.xml3
-rw-r--r--doc/classes/bool.xml83
-rw-r--r--doc/translations/ar.po6
-rw-r--r--doc/translations/ca.po6
-rw-r--r--doc/translations/classes.pot6
-rw-r--r--doc/translations/cs.po6
-rw-r--r--doc/translations/de.po6
-rw-r--r--doc/translations/es.po10
-rw-r--r--doc/translations/fa.po6
-rw-r--r--doc/translations/fi.po6
-rw-r--r--doc/translations/fr.po6
-rw-r--r--doc/translations/id.po6
-rw-r--r--doc/translations/it.po6
-rw-r--r--doc/translations/ja.po6
-rw-r--r--doc/translations/ko.po6
-rw-r--r--doc/translations/nl.po6
-rw-r--r--doc/translations/pl.po6
-rw-r--r--doc/translations/pt_BR.po6
-rw-r--r--doc/translations/ro.po6
-rw-r--r--doc/translations/ru.po6
-rw-r--r--doc/translations/sr_Cyrl.po6
-rw-r--r--doc/translations/th.po6
-rw-r--r--doc/translations/tr.po6
-rw-r--r--doc/translations/uk.po6
-rw-r--r--doc/translations/zh_Hans.po6
-rw-r--r--doc/translations/zh_Hant.po6
177 files changed, 1316 insertions, 363 deletions
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index faa380ff33..c547563a6e 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -10,6 +10,8 @@
</description>
<tutorials>
<link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
+ <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
+ <link title="Advanced vector math">https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html</link>
</tutorials>
<methods>
<method name="AABB">
diff --git a/doc/classes/AESContext.xml b/doc/classes/AESContext.xml
index ff433370bd..f577bab992 100644
--- a/doc/classes/AESContext.xml
+++ b/doc/classes/AESContext.xml
@@ -5,7 +5,8 @@
</brief_description>
<description>
This class provides access to AES encryption/decryption of raw data. Both AES-ECB and AES-CBC mode are supported.
- [codeblock]
+ [codeblocks]
+ [gdscript]
extends Node
var aes = AESContext.new()
@@ -35,7 +36,45 @@
aes.finish()
# Check CBC
assert(decrypted == data.to_utf8())
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ using Godot;
+ using System;
+ using System.Diagnostics;
+
+ public class Example : Node
+ {
+ public AESContext Aes = new AESContext();
+ public override void _Ready()
+ {
+ string key = "My secret key!!!"; // Key must be either 16 or 32 bytes.
+ string data = "My secret text!!"; // Data size must be multiple of 16 bytes, apply padding if needed.
+ // Encrypt ECB
+ Aes.Start(AESContext.Mode.EcbEncrypt, key.ToUTF8());
+ byte[] encrypted = Aes.Update(data.ToUTF8());
+ Aes.Finish();
+ // Decrypt ECB
+ Aes.Start(AESContext.Mode.EcbDecrypt, key.ToUTF8());
+ byte[] decrypted = Aes.Update(encrypted);
+ Aes.Finish();
+ // Check ECB
+ Debug.Assert(decrypted == data.ToUTF8());
+
+ string iv = "My secret iv!!!!"; // IV must be of exactly 16 bytes.
+ // Encrypt CBC
+ Aes.Start(AESContext.Mode.EcbEncrypt, key.ToUTF8(), iv.ToUTF8());
+ encrypted = Aes.Update(data.ToUTF8());
+ Aes.Finish();
+ // Decrypt CBC
+ Aes.Start(AESContext.Mode.EcbDecrypt, key.ToUTF8(), iv.ToUTF8());
+ decrypted = Aes.Update(encrypted);
+ Aes.Finish();
+ // Check CBC
+ Debug.Assert(decrypted == data.ToUTF8());
+ }
+ }
+ [/csharp]
+ [/codeblocks]
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml
index 2695e86f47..0cd7d3dc25 100644
--- a/doc/classes/AStar.xml
+++ b/doc/classes/AStar.xml
@@ -7,7 +7,8 @@
A* (A star) is a computer algorithm that is widely used in pathfinding and graph traversal, the process of plotting short paths among vertices (points), passing through a given set of edges (segments). It enjoys widespread use due to its performance and accuracy. Godot's A* implementation uses points in three-dimensional space and Euclidean distances by default.
You must add points manually with [method add_point] and create segments manually with [method connect_points]. Then you can test if there is a path between two points with the [method are_points_connected] function, get a path containing indices by [method get_id_path], or one containing actual coordinates with [method get_point_path].
It is also possible to use non-Euclidean distances. To do so, create a class that extends [code]AStar[/code] and override methods [method _compute_cost] and [method _estimate_cost]. Both take two indices and return a length, as is shown in the following example.
- [codeblock]
+ [codeblocks]
+ [gdscript]
class MyAStar:
extends AStar
@@ -16,7 +17,21 @@
func _estimate_cost(u, v):
return min(0, abs(u - v) - 1)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public class MyAStar : AStar
+ {
+ public override float _ComputeCost(int u, int v)
+ {
+ return Mathf.Abs(u - v);
+ }
+ public override float _EstimateCost(int u, int v)
+ {
+ return Mathf.Min(0, Mathf.Abs(u - v) - 1);
+ }
+ }
+ [/csharp]
+ [/codeblocks]
[method _estimate_cost] should return a lower bound of the distance, i.e. [code]_estimate_cost(u, v) &lt;= _compute_cost(u, v)[/code]. This serves as a hint to the algorithm because the custom [code]_compute_cost[/code] might be computation-heavy. If this is not the case, make [method _estimate_cost] return the same value as [method _compute_cost] to provide the algorithm with the most accurate information.
</description>
<tutorials>
@@ -57,10 +72,16 @@
</argument>
<description>
Adds a new point at the given position with the given identifier. The algorithm prefers points with lower [code]weight_scale[/code] to form a path. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger.
- [codeblock]
+ [codeblocks]
+ [gdscript]
var astar = AStar.new()
astar.add_point(1, Vector3(1, 0, 0), 4) # Adds the point (1, 0, 0) with weight_scale 4 and id 1
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var astar = new AStar();
+ astar.AddPoint(1, new Vector3(1, 0, 0), 4); // Adds the point (1, 0, 0) with weight_scale 4 and id 1
+ [/csharp]
+ [/codeblocks]
If there already exists a point for the given [code]id[/code], its position and weight scale are updated to the given values.
</description>
</method>
@@ -95,12 +116,20 @@
</argument>
<description>
Creates a segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is allowed, not the reverse direction.
- [codeblock]
+ [codeblocks]
+ [gdscript]
var astar = AStar.new()
astar.add_point(1, Vector3(1, 1, 0))
astar.add_point(2, Vector3(0, 5, 0))
astar.connect_points(1, 2, false)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var astar = new AStar();
+ astar.AddPoint(1, new Vector3(1, 1, 0));
+ astar.AddPoint(2, new Vector3(0, 5, 0));
+ astar.ConnectPoints(1, 2, false);
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="disconnect_points">
@@ -142,13 +171,22 @@
</argument>
<description>
Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points.
- [codeblock]
+ [codeblocks]
+ [gdscript]
var astar = AStar.new()
astar.add_point(1, Vector3(0, 0, 0))
astar.add_point(2, Vector3(0, 5, 0))
astar.connect_points(1, 2)
var res = astar.get_closest_position_in_segment(Vector3(3, 3, 0)) # Returns (0, 3, 0)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var astar = new AStar();
+ astar.AddPoint(1, new Vector3(0, 0, 0));
+ astar.AddPoint(2, new Vector3(0, 5, 0));
+ astar.ConnectPoints(1, 2);
+ Vector3 res = astar.GetClosestPositionInSegment(new Vector3(3, 3, 0)); // Returns (0, 3, 0)
+ [/csharp]
+ [/codeblocks]
The result is in the segment that goes from [code]y = 0[/code] to [code]y = 5[/code]. It's the closest position in the segment to the given point.
</description>
</method>
@@ -161,7 +199,8 @@
</argument>
<description>
Returns an array with the IDs of the points that form the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path.
- [codeblock]
+ [codeblocks]
+ [gdscript]
var astar = AStar.new()
astar.add_point(1, Vector3(0, 0, 0))
astar.add_point(2, Vector3(0, 1, 0), 1) # Default weight is 1
@@ -174,7 +213,20 @@
astar.connect_points(1, 4, false)
var res = astar.get_id_path(1, 3) # Returns [1, 2, 3]
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var astar = new AStar();
+ astar.AddPoint(1, new Vector3(0, 0, 0));
+ astar.AddPoint(2, new Vector3(0, 1, 0), 1); // Default weight is 1
+ astar.AddPoint(3, new Vector3(1, 1, 0));
+ astar.AddPoint(4, new Vector3(2, 0, 0));
+ astar.ConnectPoints(1, 2, false);
+ astar.ConnectPoints(2, 3, false);
+ astar.ConnectPoints(4, 3, false);
+ astar.ConnectPoints(1, 4, false);
+ int[] res = astar.GetIdPath(1, 3); // Returns [1, 2, 3]
+ [/csharp]
+ [/codeblocks]
If you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2.
</description>
</method>
@@ -192,7 +244,8 @@
</argument>
<description>
Returns an array with the IDs of the points that form the connection with the given point.
- [codeblock]
+ [codeblocks]
+ [gdscript]
var astar = AStar.new()
astar.add_point(1, Vector3(0, 0, 0))
astar.add_point(2, Vector3(0, 1, 0))
@@ -203,7 +256,19 @@
astar.connect_points(1, 3, true)
var neighbors = astar.get_point_connections(1) # Returns [2, 3]
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var astar = new AStar();
+ astar.AddPoint(1, new Vector3(0, 0, 0));
+ astar.AddPoint(2, new Vector3(0, 1, 0));
+ astar.AddPoint(3, new Vector3(1, 1, 0));
+ astar.AddPoint(4, new Vector3(2, 0, 0));
+ astar.ConnectPoints(1, 2, true);
+ astar.ConnectPoints(1, 3, true);
+
+ int[] neighbors = astar.GetPointConnections(1); // Returns [2, 3]
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_point_count" qualifiers="const">
diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml
index 622d336ef6..1540d8dacc 100644
--- a/doc/classes/AStar2D.xml
+++ b/doc/classes/AStar2D.xml
@@ -44,10 +44,16 @@
</argument>
<description>
Adds a new point at the given position with the given identifier. The algorithm prefers points with lower [code]weight_scale[/code] to form a path. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger.
- [codeblock]
+ [codeblocks]
+ [gdscript]
var astar = AStar2D.new()
astar.add_point(1, Vector2(1, 0), 4) # Adds the point (1, 0) with weight_scale 4 and id 1
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var astar = new AStar2D();
+ astar.AddPoint(1, new Vector2(1, 0), 4); // Adds the point (1, 0) with weight_scale 4 and id 1
+ [/csharp]
+ [/codeblocks]
If there already exists a point for the given [code]id[/code], its position and weight scale are updated to the given values.
</description>
</method>
@@ -80,12 +86,20 @@
</argument>
<description>
Creates a segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is allowed, not the reverse direction.
- [codeblock]
+ [codeblocks]
+ [gdscript]
var astar = AStar2D.new()
astar.add_point(1, Vector2(1, 1))
astar.add_point(2, Vector2(0, 5))
astar.connect_points(1, 2, false)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var astar = new AStar2D();
+ astar.AddPoint(1, new Vector2(1, 1));
+ astar.AddPoint(2, new Vector2(0, 5));
+ astar.ConnectPoints(1, 2, false);
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="disconnect_points">
@@ -125,13 +139,22 @@
</argument>
<description>
Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points.
- [codeblock]
+ [codeblocks]
+ [gdscript]
var astar = AStar2D.new()
astar.add_point(1, Vector2(0, 0))
astar.add_point(2, Vector2(0, 5))
astar.connect_points(1, 2)
var res = astar.get_closest_position_in_segment(Vector2(3, 3)) # Returns (0, 3)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var astar = new AStar2D();
+ astar.AddPoint(1, new Vector2(0, 0));
+ astar.AddPoint(2, new Vector2(0, 5));
+ astar.ConnectPoints(1, 2);
+ Vector2 res = astar.GetClosestPositionInSegment(new Vector2(3, 3)); // Returns (0, 3)
+ [/csharp]
+ [/codeblocks]
The result is in the segment that goes from [code]y = 0[/code] to [code]y = 5[/code]. It's the closest position in the segment to the given point.
</description>
</method>
@@ -144,7 +167,8 @@
</argument>
<description>
Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
- [codeblock]
+ [codeblocks]
+ [gdscript]
var astar = AStar2D.new()
astar.add_point(1, Vector2(0, 0))
astar.add_point(2, Vector2(0, 1), 1) # Default weight is 1
@@ -157,7 +181,21 @@
astar.connect_points(1, 4, false)
var res = astar.get_id_path(1, 3) # Returns [1, 2, 3]
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var astar = new AStar2D();
+ astar.AddPoint(1, new Vector2(0, 0));
+ astar.AddPoint(2, new Vector2(0, 1), 1); // Default weight is 1
+ astar.AddPoint(3, new Vector2(1, 1));
+ astar.AddPoint(4, new Vector2(2, 0));
+
+ astar.ConnectPoints(1, 2, false);
+ astar.ConnectPoints(2, 3, false);
+ astar.ConnectPoints(4, 3, false);
+ astar.ConnectPoints(1, 4, false);
+ int[] res = astar.GetIdPath(1, 3); // Returns [1, 2, 3]
+ [/csharp]
+ [/codeblocks]
If you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2.
</description>
</method>
@@ -175,7 +213,8 @@
</argument>
<description>
Returns an array with the IDs of the points that form the connection with the given point.
- [codeblock]
+ [codeblocks]
+ [gdscript]
var astar = AStar2D.new()
astar.add_point(1, Vector2(0, 0))
astar.add_point(2, Vector2(0, 1))
@@ -186,7 +225,20 @@
astar.connect_points(1, 3, true)
var neighbors = astar.get_point_connections(1) # Returns [2, 3]
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var astar = new AStar2D();
+ astar.AddPoint(1, new Vector2(0, 0));
+ astar.AddPoint(2, new Vector2(0, 1));
+ astar.AddPoint(3, new Vector2(1, 1));
+ astar.AddPoint(4, new Vector2(2, 0));
+
+ astar.ConnectPoints(1, 2, true);
+ astar.ConnectPoints(1, 3, true);
+
+ int[] neighbors = astar.GetPointConnections(1); // Returns [2, 3]
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_point_count" qualifiers="const">
diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml
index 6b1864b679..e5eb216062 100644
--- a/doc/classes/AcceptDialog.xml
+++ b/doc/classes/AcceptDialog.xml
@@ -76,6 +76,7 @@
<signals>
<signal name="cancelled">
<description>
+ Emitted when the dialog is closed or the button created with [method add_cancel] is pressed.
</description>
</signal>
<signal name="confirmed">
diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml
index e23a4fe9f8..39228eab79 100644
--- a/doc/classes/AnimatedSprite2D.xml
+++ b/doc/classes/AnimatedSprite2D.xml
@@ -9,6 +9,7 @@
</description>
<tutorials>
<link title="2D Sprite animation">https://docs.godotengine.org/en/latest/tutorials/2d/2d_sprite_animation.html</link>
+ <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
<method name="is_playing" qualifiers="const">
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index 0a2925e6d5..ceef16f158 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -5,7 +5,8 @@
</brief_description>
<description>
An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track.
- [codeblock]
+ [codeblocks]
+ [gdscript]
# This creates an animation that makes the node "Enemy" move to the right by
# 100 pixels in 0.5 seconds.
var animation = Animation.new()
@@ -13,7 +14,17 @@
animation.track_set_path(track_index, "Enemy:position:x")
animation.track_insert_key(track_index, 0.0, 0)
animation.track_insert_key(track_index, 0.5, 100)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ // This creates an animation that makes the node "Enemy" move to the right by
+ // 100 pixels in 0.5 seconds.
+ var animation = new Animation();
+ int trackIndex = animation.AddTrack(Animation.TrackType.Value);
+ animation.TrackSetPath(trackIndex, "Enemy:position:x");
+ animation.TrackInsertKey(trackIndex, 0.0f, 0);
+ animation.TrackInsertKey(trackIndex, 0.5f, 100);
+ [/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.
</description>
<tutorials>
@@ -681,6 +692,17 @@
Sets the update mode (see [enum UpdateMode]) of a value track.
</description>
</method>
+ <method name="value_track_interpolate" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="track_idx" type="int">
+ </argument>
+ <argument index="1" name="time_sec" type="float">
+ </argument>
+ <description>
+ Returns the interpolated value at the given time (in seconds). The [code]track_idx[/code] must be the index of a value track.
+ </description>
+ </method>
</methods>
<members>
<member name="length" type="float" setter="set_length" getter="get_length" default="1.0">
diff --git a/doc/classes/AnimationNodeAdd3.xml b/doc/classes/AnimationNodeAdd3.xml
index 94a6ae4221..0e49ac7bbf 100644
--- a/doc/classes/AnimationNodeAdd3.xml
+++ b/doc/classes/AnimationNodeAdd3.xml
@@ -12,6 +12,7 @@
</description>
<tutorials>
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/AnimationNodeAnimation.xml b/doc/classes/AnimationNodeAnimation.xml
index d8ac5413fd..3f0843c112 100644
--- a/doc/classes/AnimationNodeAnimation.xml
+++ b/doc/classes/AnimationNodeAnimation.xml
@@ -8,6 +8,8 @@
</description>
<tutorials>
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/AnimationNodeBlend2.xml b/doc/classes/AnimationNodeBlend2.xml
index e2cd12e685..e509a2df6c 100644
--- a/doc/classes/AnimationNodeBlend2.xml
+++ b/doc/classes/AnimationNodeBlend2.xml
@@ -8,6 +8,8 @@
</description>
<tutorials>
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml
index 460c11cc5e..abbc8cb2e6 100644
--- a/doc/classes/AnimationNodeBlendSpace2D.xml
+++ b/doc/classes/AnimationNodeBlendSpace2D.xml
@@ -10,6 +10,7 @@
</description>
<tutorials>
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="add_blend_point">
diff --git a/doc/classes/AnimationNodeOneShot.xml b/doc/classes/AnimationNodeOneShot.xml
index d5793e5839..65ab363e1f 100644
--- a/doc/classes/AnimationNodeOneShot.xml
+++ b/doc/classes/AnimationNodeOneShot.xml
@@ -8,6 +8,7 @@
</description>
<tutorials>
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="get_mix_mode" qualifiers="const">
diff --git a/doc/classes/AnimationNodeOutput.xml b/doc/classes/AnimationNodeOutput.xml
index 7640f4dcfa..c4150d7e82 100644
--- a/doc/classes/AnimationNodeOutput.xml
+++ b/doc/classes/AnimationNodeOutput.xml
@@ -7,6 +7,8 @@
</description>
<tutorials>
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml
index 9ea83d2c5e..e08e288c59 100644
--- a/doc/classes/AnimationNodeStateMachine.xml
+++ b/doc/classes/AnimationNodeStateMachine.xml
@@ -6,10 +6,16 @@
<description>
Contains multiple nodes representing animation states, connected in a graph. Node transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the [AnimationNodeStateMachinePlayback] object from the [AnimationTree] node to control it programmatically.
[b]Example:[/b]
- [codeblock]
+ [codeblocks]
+ [gdscript]
var state_machine = $AnimationTree.get("parameters/playback")
state_machine.travel("some_state")
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var stateMachine = GetNode&lt;AnimationTree&gt;("AnimationTree").Get("parameters/playback") as AnimationNodeStateMachinePlayback;
+ stateMachine.Travel("some_state");
+ [/csharp]
+ [/codeblocks]
</description>
<tutorials>
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml
index fec68d5b74..60ff425cdb 100644
--- a/doc/classes/AnimationNodeStateMachinePlayback.xml
+++ b/doc/classes/AnimationNodeStateMachinePlayback.xml
@@ -6,10 +6,16 @@
<description>
Allows control of [AnimationTree] state machines created with [AnimationNodeStateMachine]. Retrieve with [code]$AnimationTree.get("parameters/playback")[/code].
[b]Example:[/b]
- [codeblock]
+ [codeblocks]
+ [gdscript]
var state_machine = $AnimationTree.get("parameters/playback")
state_machine.travel("some_state")
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var stateMachine = GetNode&lt;AnimationTree&gt;("AnimationTree").Get("parameters/playback") as AnimationNodeStateMachinePlayback;
+ stateMachine.Travel("some_state");
+ [/csharp]
+ [/codeblocks]
</description>
<tutorials>
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml
index fe0154acad..2f0ebd7de6 100644
--- a/doc/classes/AnimationNodeStateMachineTransition.xml
+++ b/doc/classes/AnimationNodeStateMachineTransition.xml
@@ -12,9 +12,14 @@
<members>
<member name="advance_condition" type="StringName" setter="set_advance_condition" getter="get_advance_condition" default="@&quot;&quot;">
Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to [code]"idle"[/code]:
- [codeblock]
- $animation_tree["parameters/conditions/idle"] = is_on_floor and (linear_velocity.x == 0)
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ $animation_tree.set("parameters/conditions/idle", is_on_floor and (linear_velocity.x == 0))
+ [/gdscript]
+ [csharp]
+ GetNode&lt;AnimationTree&gt;("animation_tree").Set("parameters/conditions/idle", IsOnFloor &amp;&amp; (LinearVelocity.x == 0));
+ [/csharp]
+ [/codeblocks]
</member>
<member name="auto_advance" type="bool" setter="set_auto_advance" getter="has_auto_advance" default="false">
Turn on the transition automatically when this state is reached. This works best with [constant SWITCH_MODE_AT_END].
diff --git a/doc/classes/AnimationNodeTimeScale.xml b/doc/classes/AnimationNodeTimeScale.xml
index 334fdb0b95..2ce8309418 100644
--- a/doc/classes/AnimationNodeTimeScale.xml
+++ b/doc/classes/AnimationNodeTimeScale.xml
@@ -8,6 +8,7 @@
</description>
<tutorials>
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/AnimationNodeTransition.xml b/doc/classes/AnimationNodeTransition.xml
index 8338f0d39a..73c7006768 100644
--- a/doc/classes/AnimationNodeTransition.xml
+++ b/doc/classes/AnimationNodeTransition.xml
@@ -8,6 +8,8 @@
</description>
<tutorials>
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
+ <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="get_input_caption" qualifiers="const">
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index 8396cdb6cf..de2087d930 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -9,9 +9,9 @@
Updating the target properties of animations occurs at process time.
</description>
<tutorials>
- <link title="Animations">https://docs.godotengine.org/en/latest/getting_started/step_by_step/animations.html</link>
<link title="2D Sprite animation">https://docs.godotengine.org/en/latest/tutorials/2d/2d_sprite_animation.html</link>
<link title="Animation tutorial index">https://docs.godotengine.org/en/latest/tutorials/animation/index.html</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="add_animation">
diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml
index cc8e83f509..262b5addb7 100644
--- a/doc/classes/AnimationTree.xml
+++ b/doc/classes/AnimationTree.xml
@@ -8,7 +8,7 @@
</description>
<tutorials>
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
- <link title="Third-person shooter demo code repository">https://github.com/godotengine/tps-demo</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="advance">
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml
index e98c0af0d9..4f8d102393 100644
--- a/doc/classes/Area2D.xml
+++ b/doc/classes/Area2D.xml
@@ -8,6 +8,9 @@
</description>
<tutorials>
<link title="Using Area2D">https://docs.godotengine.org/en/latest/tutorials/physics/using_area_2d.html</link>
+ <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
+ <link title="2D Pong Demo">https://godotengine.org/asset-library/asset/121</link>
+ <link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link>
</tutorials>
<methods>
<method name="get_collision_layer_bit" qualifiers="const">
diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml
index ad9eff3a64..db1c96c8cb 100644
--- a/doc/classes/Area3D.xml
+++ b/doc/classes/Area3D.xml
@@ -7,6 +7,8 @@
3D area that detects [CollisionObject3D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping).
</description>
<tutorials>
+ <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
+ <link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link>
</tutorials>
<methods>
<method name="get_collision_layer_bit" qualifiers="const">
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 8bbb0817ea..87b7443a8a 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -6,20 +6,38 @@
<description>
Generic array which can contain several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 the second to last, etc.).
[b]Example:[/b]
- [codeblock]
+ [codeblocks]
+ [gdscript]
var array = ["One", 2, 3, "Four"]
print(array[0]) # One.
print(array[2]) # 3.
print(array[-1]) # Four.
array[2] = "Three"
print(array[-2]) # Three.
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var array = new Godot.Collections.Array{"One", 2, 3, "Four"};
+ GD.Print(array[0]); // One.
+ GD.Print(array[2]); // 3.
+ GD.Print(array[array.Count - 1]); // Four.
+ array[2] = "Three";
+ GD.Print(array[array.Count - 2]); // Three.
+ [/csharp]
+ [/codeblocks]
Arrays can be concatenated using the [code]+[/code] operator:
- [codeblock]
+ [codeblocks]
+ [gdscript]
var array1 = ["One", 2]
var array2 = [3, "Four"]
print(array1 + array2) # ["One", 2, 3, "Four"]
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ // Array concatenation is not possible with C# arrays, but is with Godot.Collections.Array.
+ var array1 = new Godot.Collections.Array("One", 2);
+ var array2 = new Godot.Collections.Array(3, "Four");
+ GD.Print(array1 + array2); // Prints [One, 2, 3, Four]
+ [/csharp]
+ [/codeblocks]
[b]Note:[/b] Arrays are always passed by reference. To get a copy of an array which can be modified independently of the original array, use [method duplicate].
</description>
<tutorials>
@@ -228,18 +246,39 @@
</argument>
<description>
Returns [code]true[/code] if the array contains the given value.
- [codeblock]
+ [codeblocks]
+ [gdscript]
print(["inside", 7].has("inside")) # True
print(["inside", 7].has("outside")) # False
print(["inside", 7].has(7)) # True
print(["inside", 7].has("7")) # False
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var arr = new Godot.Collections.Array{"inside", 7};
+ // has is renamed to Contains
+ GD.Print(arr.Contains("inside")); // True
+ GD.Print(arr.Contains("outside")); // False
+ GD.Print(arr.Contains(7)); // True
+ GD.Print(arr.Contains("7")); // False
+ [/csharp]
+ [/codeblocks]
+
[b]Note:[/b] This is equivalent to using the [code]in[/code] operator as follows:
- [codeblock]
+ [codeblocks]
+ [gdscript]
# Will evaluate to `true`.
if 2 in [2, 4, 6, 8]:
- pass
- [/codeblock]
+ print("Containes!")
+ [/gdscript]
+ [csharp]
+ // As there is no "in" keyword in C#, you have to use Contains
+ var array = new Godot.Collections.Array{2, 4, 6, 8};
+ if (array.Contains(2))
+ {
+ GD.Print("Containes!");
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="hash">
@@ -377,11 +416,16 @@
<description>
Sorts the array.
[b]Note:[/b] Strings are sorted in alphabetical order (as opposed to natural order). This may lead to unexpected behavior when sorting an array of strings ending with a sequence of numbers. Consider the following example:
- [codeblock]
+ [codeblocks]
+ [gdscript]
var strings = ["string1", "string2", "string10", "string11"]
strings.sort()
print(strings) # Prints [string1, string10, string11, string2]
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ // There is no sort support for Godot.Collections.Array
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="sort_custom">
@@ -394,7 +438,8 @@
<description>
Sorts the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code].
[b]Note:[/b] you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
- [codeblock]
+ [codeblocks]
+ [gdscript]
class MyCustomSorter:
static func sort_ascending(a, b):
if a[0] &lt; b[0]:
@@ -404,7 +449,11 @@
var my_items = [[5, "Potato"], [9, "Rice"], [4, "Tomato"]]
my_items.sort_custom(MyCustomSorter, "sort_ascending")
print(my_items) # Prints [[4, Tomato], [5, Potato], [9, Rice]].
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ // There is no custom sort support for Godot.Collections.Array
+ [/csharp]
+ [/codeblocks]
</description>
</method>
</methods>
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 4ec39ecc2f..4edf69ccb2 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -6,21 +6,42 @@
<description>
The [ArrayMesh] is used to construct a [Mesh] by specifying the attributes as arrays.
The most basic example is the creation of a single triangle:
- [codeblock]
+ [codeblocks]
+ [gdscript]
var vertices = PackedVector3Array()
vertices.push_back(Vector3(0, 1, 0))
vertices.push_back(Vector3(1, 0, 0))
vertices.push_back(Vector3(0, 0, 1))
+
# Initialize the ArrayMesh.
var arr_mesh = ArrayMesh.new()
var arrays = []
arrays.resize(ArrayMesh.ARRAY_MAX)
arrays[ArrayMesh.ARRAY_VERTEX] = vertices
+
# Create the Mesh.
arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays)
var m = MeshInstance3D.new()
m.mesh = arr_mesh
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var vertices = new Godot.Collections.Array&lt;Vector3&gt;();
+ vertices.Add(new Vector3(0, 1, 0));
+ vertices.Add(new Vector3(1, 0, 0));
+ vertices.Add(new Vector3(0, 0, 1));
+
+ // Initialize the ArrayMesh.
+ var arrMesh = new ArrayMesh();
+ var arrays = new Godot.Collections.Array();
+ arrays.Resize((int)ArrayMesh.ArrayType.Max);
+ arrays[(int)ArrayMesh.ArrayType.Vertex] = vertices;
+
+ // Create the Mesh.
+ arrMesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, arrays);
+ var m = new MeshInstance();
+ m.Mesh = arrMesh;
+ [/csharp]
+ [/codeblocks]
The [MeshInstance3D] is ready to be added to the [SceneTree] to be shown.
See also [ImmediateGeometry3D], [MeshDataTool] and [SurfaceTool] for procedural geometry generation.
[b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes.
diff --git a/doc/classes/AudioEffect.xml b/doc/classes/AudioEffect.xml
index 60bf15ce57..955285bd2e 100644
--- a/doc/classes/AudioEffect.xml
+++ b/doc/classes/AudioEffect.xml
@@ -7,6 +7,7 @@
Base resource for audio bus. Applies an audio effect on the bus that the resource is applied on.
</description>
<tutorials>
+ <link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/AudioEffectHighShelfFilter.xml b/doc/classes/AudioEffectHighShelfFilter.xml
index cf620e4417..4ba31f9fc8 100644
--- a/doc/classes/AudioEffectHighShelfFilter.xml
+++ b/doc/classes/AudioEffectHighShelfFilter.xml
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectHighShelfFilter" inherits="AudioEffectFilter" version="4.0">
<brief_description>
+ Reduces all frequencies above the [member AudioEffectFilter.cutoff_hz].
</brief_description>
<description>
</description>
<tutorials>
+ <link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/AudioEffectLowShelfFilter.xml b/doc/classes/AudioEffectLowShelfFilter.xml
index 7cf09b0f05..078e7bf1a1 100644
--- a/doc/classes/AudioEffectLowShelfFilter.xml
+++ b/doc/classes/AudioEffectLowShelfFilter.xml
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectLowShelfFilter" inherits="AudioEffectFilter" version="4.0">
<brief_description>
+ Reduces all frequencies below the [member AudioEffectFilter.cutoff_hz].
</brief_description>
<description>
</description>
<tutorials>
+ <link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/AudioEffectRecord.xml b/doc/classes/AudioEffectRecord.xml
index 6617d16290..872ddf3b0f 100644
--- a/doc/classes/AudioEffectRecord.xml
+++ b/doc/classes/AudioEffectRecord.xml
@@ -8,6 +8,7 @@
</description>
<tutorials>
<link title="Recording with microphone">https://docs.godotengine.org/en/latest/tutorials/audio/recording_with_microphone.html</link>
+ <link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link>
</tutorials>
<methods>
<method name="get_recording" qualifiers="const">
diff --git a/doc/classes/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml
index 26eb2be753..fbe68cde0e 100644
--- a/doc/classes/AudioEffectReverb.xml
+++ b/doc/classes/AudioEffectReverb.xml
@@ -8,6 +8,7 @@
Simulates rooms of different sizes. Its parameters can be adjusted to simulate the sound of a specific room.
</description>
<tutorials>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml
index d5fd5d8f00..dafc0065f6 100644
--- a/doc/classes/AudioServer.xml
+++ b/doc/classes/AudioServer.xml
@@ -8,6 +8,9 @@
</description>
<tutorials>
<link title="Audio buses">https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link>
+ <link title="Audio Device Changer Demo">https://godotengine.org/asset-library/asset/525</link>
+ <link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link>
+ <link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link>
</tutorials>
<methods>
<method name="add_bus">
diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml
index 58768dc008..bbfec579bb 100644
--- a/doc/classes/AudioStream.xml
+++ b/doc/classes/AudioStream.xml
@@ -8,6 +8,9 @@
</description>
<tutorials>
<link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link>
+ <link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
+ <link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link>
+ <link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link>
</tutorials>
<methods>
<method name="get_length" qualifiers="const">
diff --git a/doc/classes/AudioStreamGenerator.xml b/doc/classes/AudioStreamGenerator.xml
index 51254f9305..a273beb5af 100644
--- a/doc/classes/AudioStreamGenerator.xml
+++ b/doc/classes/AudioStreamGenerator.xml
@@ -5,7 +5,7 @@
<description>
</description>
<tutorials>
- <link title="Audio generator demo project">https://github.com/godotengine/godot-demo-projects/tree/master/audio/generator</link>
+ <link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml
index f928d54526..da75ff206c 100644
--- a/doc/classes/AudioStreamPlayback.xml
+++ b/doc/classes/AudioStreamPlayback.xml
@@ -7,6 +7,7 @@
Can play, loop, pause a scroll through audio. See [AudioStream] and [AudioStreamOGGVorbis] for usage.
</description>
<tutorials>
+ <link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
index 86048ca8c1..55190c5f9f 100644
--- a/doc/classes/AudioStreamPlayer.xml
+++ b/doc/classes/AudioStreamPlayer.xml
@@ -8,6 +8,11 @@
</description>
<tutorials>
<link title="Audio streams">https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link>
+ <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
+ <link title="Audio Device Changer Demo">https://godotengine.org/asset-library/asset/525</link>
+ <link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
+ <link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link>
+ <link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link>
</tutorials>
<methods>
<method name="get_playback_position">
diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml
index 0cb0b7e57e..8c92975b9c 100644
--- a/doc/classes/BaseMaterial3D.xml
+++ b/doc/classes/BaseMaterial3D.xml
@@ -122,6 +122,7 @@
</member>
<member name="billboard_mode" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="BaseMaterial3D.BillboardMode" default="0">
Controls how the object faces the camera. See [enum BillboardMode].
+ [b]Note:[/b] Billboard mode is not suitable for VR because the left-right vector of the camera is not horizontal when the screen is attached to your head instead of on the table. See [url=https://github.com/godotengine/godot/issues/41567]GitHub issue #41567[/url] for details.
</member>
<member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="BaseMaterial3D.BlendMode" default="0">
The material's blend mode.
@@ -174,10 +175,12 @@
If [code]true[/code], the object receives no shadow that would otherwise be cast onto it.
</member>
<member name="distance_fade_max_distance" type="float" setter="set_distance_fade_max_distance" getter="get_distance_fade_max_distance">
- Distance at which the object fades fully and is no longer visible.
+ Distance at which the object appears fully opaque.
+ [b]Note:[/b] If [code]distance_fade_max_distance[/code] is less than [code]distance_fade_min_distance[/code], the behavior will be reversed. The object will start to fade away at [code]distance_fade_max_distance[/code] and will fully disappear once it reaches [code]distance_fade_min_distance[/code].
</member>
<member name="distance_fade_min_distance" type="float" setter="set_distance_fade_min_distance" getter="get_distance_fade_min_distance">
- Distance at which the object starts to fade. If the object is less than this distance away it will appear normal.
+ Distance at which the object starts to become visible. If the object is less than this distance away, it will be invisible.
+ [b]Note:[/b] If [code]distance_fade_min_distance[/code] is greater than [code]distance_fade_max_distance[/code], the behavior will be reversed. The object will start to fade away at [code]distance_fade_max_distance[/code] and will fully disappear once it reaches [code]distance_fade_min_distance[/code].
</member>
<member name="distance_fade_mode" type="int" setter="set_distance_fade" getter="get_distance_fade" enum="BaseMaterial3D.DistanceFadeMode" default="0">
Specifies which type of fade to use. Can be any of the [enum DistanceFadeMode]s.
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index c614a281ae..faea2f78b8 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -10,8 +10,13 @@
For more information, read the "Matrices and transforms" documentation article.
</description>
<tutorials>
+ <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
<link title="Matrices and transforms">https://docs.godotengine.org/en/latest/tutorials/math/matrices_and_transforms.html</link>
<link title="Using 3D transforms">https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html</link>
+ <link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link>
+ <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
+ <link title="2.5D Demo">https://godotengine.org/asset-library/asset/583</link>
</tutorials>
<methods>
<method name="Basis">
diff --git a/doc/classes/BoxShape3D.xml b/doc/classes/BoxShape3D.xml
index fd08da148d..d8cbd8b980 100644
--- a/doc/classes/BoxShape3D.xml
+++ b/doc/classes/BoxShape3D.xml
@@ -7,6 +7,9 @@
3D box shape that can be a child of a [PhysicsBody3D] or [Area3D].
</description>
<tutorials>
+ <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
+ <link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link>
+ <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index de05cfcd13..df47fa8bec 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -6,7 +6,8 @@
<description>
Button is the standard themed button. It can contain text and an icon, and will display them according to the current [Theme].
[b]Example of creating a button and assigning an action when pressed by code:[/b]
- [codeblock]
+ [codeblocks]
+ [gdscript]
func _ready():
var button = Button.new()
button.text = "Click me"
@@ -15,10 +16,28 @@
func _button_pressed():
print("Hello world!")
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public override void _Ready()
+ {
+ var button = new Button();
+ button.Text = "Click me";
+ button.Connect("pressed", this, nameof(ButtonPressed));
+ AddChild(button);
+ }
+
+ private void ButtonPressed()
+ {
+ GD.Print("Hello world!");
+ }
+ [/csharp]
+ [/codeblocks]
Buttons (like all Control nodes) can also be created in the editor, but some situations may require creating them from code.
+ See also [BaseButton] which contains common properties and methods associated with this node.
</description>
<tutorials>
+ <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
+ <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml
index 3cc74beb58..3bbee993ac 100644
--- a/doc/classes/Callable.xml
+++ b/doc/classes/Callable.xml
@@ -6,15 +6,32 @@
<description>
[Callable] is a first class object which can be held in variables and passed to functions. It represents a given method in an [Object], and is typically used for signal callbacks.
[b]Example:[/b]
- [codeblock]
+ [codeblocks]
+ [gdscript]
var callable = Callable(self, "print_args")
func print_args(arg1, arg2, arg3 = ""):
prints(arg1, arg2, arg3)
+
func test():
callable.call("hello", "world") # Prints "hello world".
callable.call(Vector2.UP, 42, callable) # Prints "(0, -1) 42 Node(Node.gd)::print_args".
callable.call("invalid") # Invalid call, should have at least 2 arguments.
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ Callable callable = new Callable(this, "print_args");
+ public void PrintArgs(object arg1, object arg2, object arg3 = "")
+ {
+ GD.PrintS(arg1, arg2, arg3);
+ }
+
+ public void Test()
+ {
+ callable.Call("hello", "world"); // Prints "hello world".
+ callable.Call(Vector2.Up, 42, callable); // Prints "(0, -1) 42 Node(Node.gd)::print_args".
+ callable.Call("invalid"); // Invalid call, should have at least 2 arguments.
+ }
+ [/csharp]
+ [/codeblocks]
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml
index ad49216b34..c7ee915109 100644
--- a/doc/classes/Camera2D.xml
+++ b/doc/classes/Camera2D.xml
@@ -9,6 +9,9 @@
Note that the [Camera2D] node's [code]position[/code] doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use [method get_camera_screen_center] to get the real position.
</description>
<tutorials>
+ <link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link>
+ <link title="2D Isometric Demo">https://godotengine.org/asset-library/asset/112</link>
+ <link title="2D HDR Demo">https://godotengine.org/asset-library/asset/110</link>
</tutorials>
<methods>
<method name="align">
diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml
index 598b4bd685..b6a108fb25 100644
--- a/doc/classes/Camera3D.xml
+++ b/doc/classes/Camera3D.xml
@@ -7,6 +7,7 @@
[Camera3D] is a special node that displays what is visible from its current location. Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. In other words, a camera just provides 3D display capabilities to a [Viewport], and, without one, a scene registered in that [Viewport] (or higher viewports) can't be displayed.
</description>
<tutorials>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="clear_current">
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 0eecada4fe..d36a997330 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -14,6 +14,7 @@
<tutorials>
<link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link>
<link title="Custom drawing in 2D">https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link>
+ <link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link>
</tutorials>
<methods>
<method name="_draw" qualifiers="virtual">
@@ -318,13 +319,22 @@
<description>
Draws [code]text[/code] using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width.
[b]Example using the default project font:[/b]
- [codeblock]
+ [codeblocks]
+ [gdscript]
# If using this method in a script that redraws constantly, move the
# `default_font` declaration to a member variable assigned in `_ready()`
# so the Control is only created once.
var default_font = Control.new().get_font("font")
draw_string(default_font, Vector2(64, 64), "Hello world")
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ // If using this method in a script that redraws constantly, move the
+ // `default_font` declaration to a member variable assigned in `_ready()`
+ // so the Control is only created once.
+ Font defaultFont = new Control().GetFont("font");
+ DrawString(defaultFont, new Vector2(64, 64), "Hello world");
+ [/csharp]
+ [/codeblocks]
See also [method Font.draw].
</description>
</method>
@@ -516,13 +526,6 @@
Returns [code]true[/code] if local transform notifications are communicated to children.
</description>
</method>
- <method name="is_set_as_toplevel" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] if the node is set as top-level. See [method set_as_toplevel].
- </description>
- </method>
<method name="is_transform_notification_enabled" qualifiers="const">
<return type="bool">
</return>
@@ -555,15 +558,6 @@
Transformations issued by [code]event[/code]'s inputs are applied in local space instead of global space.
</description>
</method>
- <method name="set_as_toplevel">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- If [code]enable[/code] is [code]true[/code], the node won't inherit its transform from parent canvas items.
- </description>
- </method>
<method name="set_notify_local_transform">
<return type="void">
</return>
@@ -613,6 +607,9 @@
<member name="show_behind_parent" type="bool" setter="set_draw_behind_parent" getter="is_draw_behind_parent_enabled" default="false">
If [code]true[/code], the object draws behind its parent.
</member>
+ <member name="top_level" type="bool" setter="set_as_top_level" getter="is_set_as_top_level">
+ If [code]true[/code], the node will not inherit its transform from parent [CanvasItem]s.
+ </member>
<member name="show_on_top" type="bool" setter="_set_on_top" getter="_is_on_top">
If [code]true[/code], the object draws on top of its parent.
</member>
diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml
index 89cd28b617..9d952cdba3 100644
--- a/doc/classes/CanvasLayer.xml
+++ b/doc/classes/CanvasLayer.xml
@@ -9,6 +9,7 @@
<tutorials>
<link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link>
<link title="Canvas layers">https://docs.godotengine.org/en/latest/tutorials/2d/canvas_layers.html</link>
+ <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
<method name="get_canvas" qualifiers="const">
diff --git a/doc/classes/CapsuleShape3D.xml b/doc/classes/CapsuleShape3D.xml
index f56d94dc63..27a6242bc9 100644
--- a/doc/classes/CapsuleShape3D.xml
+++ b/doc/classes/CapsuleShape3D.xml
@@ -7,6 +7,7 @@
Capsule shape for collisions.
</description>
<tutorials>
+ <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml
index a988035c36..d1759adf30 100644
--- a/doc/classes/CharFXTransform.xml
+++ b/doc/classes/CharFXTransform.xml
@@ -18,11 +18,18 @@
</member>
<member name="character" type="int" setter="set_character" getter="get_character" default="0">
The Unicode codepoint the character will use. This only affects non-whitespace characters. [method @GDScript.ord] can be useful here. For example, the following will replace all characters with asterisks:
- [codeblock]
+ [codeblocks]
+ [gdscript]
# `char_fx` is the CharFXTransform parameter from `_process_custom_fx()`.
# See the RichTextEffect documentation for details.
char_fx.character = ord("*")
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ // `char_fx` is the CharFXTransform parameter from `_process_custom_fx()`.
+ // See the RichTextEffect documentation for details.
+ charFx.Character = char.GetNumericValue('*');
+ [/csharp]
+ [/codeblocks]
</member>
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 0, 0, 0, 1 )">
The color the character will be drawn with.
diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml
index 9c42091eb8..f912bb98c9 100644
--- a/doc/classes/CheckBox.xml
+++ b/doc/classes/CheckBox.xml
@@ -5,6 +5,7 @@
</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.
+ See also [BaseButton] which contains common properties and methods associated with this node.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml
index 514ff9a691..b4f91cf3a8 100644
--- a/doc/classes/CheckButton.xml
+++ b/doc/classes/CheckButton.xml
@@ -5,6 +5,7 @@
</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.
+ See also [BaseButton] which contains common properties and methods associated with this node.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml
index b4fcf9cd88..c03eba82ff 100644
--- a/doc/classes/CollisionShape2D.xml
+++ b/doc/classes/CollisionShape2D.xml
@@ -8,6 +8,9 @@
</description>
<tutorials>
<link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
+ <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
+ <link title="2D Pong Demo">https://godotengine.org/asset-library/asset/121</link>
+ <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/CollisionShape3D.xml b/doc/classes/CollisionShape3D.xml
index 177900dd4f..5590947a4f 100644
--- a/doc/classes/CollisionShape3D.xml
+++ b/doc/classes/CollisionShape3D.xml
@@ -8,6 +8,9 @@
</description>
<tutorials>
<link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
+ <link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link>
+ <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="make_convex_from_siblings">
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index fcaba99eb7..ef438e422a 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -8,8 +8,12 @@
You can also create a color from standardized color names by using [method @GDScript.ColorN] or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url].
If you want to supply values in a range of 0 to 255, you should use [method @GDScript.Color8].
[b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/code] if it's equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). Otherwise, a Color will always evaluate to [code]true[/code].
+ [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/color_constants.png]Color constants cheatsheet[/url]
</description>
<tutorials>
+ <link title="2D GD Paint Demo">https://godotengine.org/asset-library/asset/517</link>
+ <link title="Tween Demo">https://godotengine.org/asset-library/asset/146</link>
+ <link title="GUI Drag And Drop Demo">https://godotengine.org/asset-library/asset/133</link>
</tutorials>
<methods>
<method name="Color">
@@ -19,21 +23,39 @@
</argument>
<description>
Constructs a color from an HTML hexadecimal color string in RGB or RGBA format. See also [method @GDScript.ColorN].
- [codeblock]
+ [codeblocks]
+ [gdscript]
# Each of the following creates the same color RGBA(178, 217, 10, 255).
var c3 = Color("#b2d90a") # RGB format with "#".
var c4 = Color("b2d90a") # RGB format.
var c1 = Color("#b2d90aff") # RGBA format with "#".
var c2 = Color("b2d90aff") # RGBA format.
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ // Each of the following creates the same color RGBA(178, 217, 10, 255).
+ var c3 = new Color("#b2d90a");
+ var c4 = new Color("b2d90a"); // RGB format.
+ var c1 = new Color("#b2d90aff");
+ var c2 = new Color("b2d90aff"); // RGBA format.
+ [/csharp]
+ [/codeblocks]
You can also use the "web color" short-hand form by only using 3 or 4 digits.
- [codeblock]
+ [codeblocks]
+ [gdscript]
# Each of the following creates the same color RGBA(17, 34, 51, 255).
var c3 = Color("#123") # RGB format with "#".
var c4 = Color("123") # RGB format.
var c1 = Color("#123f") # RGBA format with "#".
var c2 = Color("123f") # RGBA format.
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ // Each of the following creates the same color RGBA(17, 34, 51, 255).
+ var c3 = new Color("#123");
+ var c4 = new Color("123"); // RGB format.
+ var c1 = new Color("#123f");
+ var c2 = new Color("123f"); // RGBA format.
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="Color">
@@ -43,9 +65,14 @@
</argument>
<description>
Constructs a color from a 32-bit integer (each byte represents a component of the RGBA profile).
- [codeblock]
+ [codeblocks]
+ [gdscript]
var c = Color(274) # Equivalent to RGBA(0, 0, 1, 18)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var c = new Color(274); // Equivalent to RGBA(0, 0, 1, 18)
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="Color">
@@ -57,9 +84,14 @@
</argument>
<description>
Constructs a color from an existing color, but with a custom alpha value.
- [codeblock]
+ [codeblocks]
+ [gdscript]
var red = Color(Color.red, 0.5) # 50% transparent red.
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var red = new Color(Colors.Red, 0.5f); // 50% transparent red.
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="Color">
@@ -73,9 +105,14 @@
</argument>
<description>
Constructs a color from an RGB profile using values between 0 and 1. Alpha will always be 1.
- [codeblock]
- var c = Color(0.2, 1.0, 0.7) # Equivalent to RGBA(51, 255, 178, 255)
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var color = Color(0.2, 1.0, 0.7) # Equivalent to RGBA(51, 255, 178, 255)
+ [/gdscript]
+ [csharp]
+ var color = new Color(0.2f, 1.0f, 0.7f); // Equivalent to RGBA(51, 255, 178, 255)
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="Color">
@@ -91,9 +128,14 @@
</argument>
<description>
Constructs a color from an RGBA profile using values between 0 and 1.
- [codeblock]
- var c = Color(0.2, 1.0, 0.7, 0.8) # Equivalent to RGBA(51, 255, 178, 204)
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var color = Color(0.2, 1.0, 0.7, 0.8) # Equivalent to RGBA(51, 255, 178, 204)
+ [/gdscript]
+ [csharp]
+ var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Equivalent to RGBA(51, 255, 178, 255, 204)
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="blend">
@@ -103,11 +145,18 @@
</argument>
<description>
Returns a new color resulting from blending this color over another. If the color is opaque, the result is also opaque. The second color may have a range of alpha values.
- [codeblock]
+ [codeblocks]
+ [gdscript]
var bg = Color(0.0, 1.0, 0.0, 0.5) # Green with alpha of 50%
var fg = Color(1.0, 0.0, 0.0, 0.5) # Red with alpha of 50%
var blended_color = bg.blend(fg) # Brown with alpha of 75%
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var bg = new Color(0.0f, 1.0f, 0.0f, 0.5f); // Green with alpha of 50%
+ var fg = new Color(1.0f, 0.0f, 0.0f, 0.5f); // Red with alpha of 50%
+ Color blendedColor = bg.Blend(fg); // Brown with alpha of 75%
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="contrasted">
@@ -115,10 +164,16 @@
</return>
<description>
Returns the most contrasting color.
- [codeblock]
- var c = Color(0.3, 0.4, 0.9)
- var contrasted_color = c.contrasted() # Equivalent to RGBA(204, 229, 102, 255)
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var color = Color(0.3, 0.4, 0.9)
+ var contrasted_color = color.contrasted() # Equivalent to RGBA(204, 229, 102, 255)
+ [/gdscript]
+ [csharp]
+ var color = new Color(0.3f, 0.4f, 0.9f);
+ Color contrastedColor = color.Contrasted(); // Equivalent to RGBA(204, 229, 102, 255)
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="darkened">
@@ -128,10 +183,16 @@
</argument>
<description>
Returns a new color resulting from making this color darker by the specified percentage (ratio from 0 to 1).
- [codeblock]
+ [codeblocks]
+ [gdscript]
var green = Color(0.0, 1.0, 0.0)
var darkgreen = green.darkened(0.2) # 20% darker than regular green
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var green = new Color(0.0f, 1.0f, 0.0f);
+ Color darkgreen = green.Darkened(0.2f); // 20% darker than regular green
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="from_hsv">
@@ -147,9 +208,14 @@
</argument>
<description>
Constructs a color from an HSV profile. [code]h[/code], [code]s[/code], and [code]v[/code] are values between 0 and 1.
- [codeblock]
- var c = Color.from_hsv(0.58, 0.5, 0.79, 0.8) # Equivalent to HSV(210, 50, 79, 0.8) or Color8(100, 151, 201, 0.8)
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var color = Color.from_hsv(0.58, 0.5, 0.79, 0.8) # Equivalent to HSV(210, 50, 79, 0.8) or Color8(100, 151, 201, 0.8)
+ [/gdscript]
+ [csharp]
+ Color color = Color.FromHsv(0.58f, 0.5f, 0.79f, 0.8f); // Equivalent to HSV(210, 50, 79, 0.8) or Color8(100, 151, 201, 0.8)
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="inverted">
@@ -157,10 +223,16 @@
</return>
<description>
Returns the inverted color [code](1 - r, 1 - g, 1 - b, a)[/code].
- [codeblock]
- var c = Color(0.3, 0.4, 0.9)
- var inverted_color = c.inverted() # A color of an RGBA(178, 153, 26, 255)
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var color = Color(0.3, 0.4, 0.9)
+ var inverted_color = color.inverted() # A color of an RGBA(178, 153, 26, 255)
+ [/gdscript]
+ [csharp]
+ var color = new Color(0.3f, 0.4f, 0.9f);
+ Color invertedColor = color.Inverted(); // A color of an RGBA(178, 153, 26, 255)
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="is_equal_approx">
@@ -181,11 +253,18 @@
</argument>
<description>
Returns the linear interpolation with another color. The interpolation factor [code]t[/code] is between 0 and 1.
- [codeblock]
+ [codeblocks]
+ [gdscript]
var c1 = Color(1.0, 0.0, 0.0)
var c2 = Color(0.0, 1.0, 0.0)
- var li_c = c1.lerp(c2, 0.5) # A color of an RGBA(128, 128, 0, 255)
- [/codeblock]
+ var lerp_color = c1.lerp(c2, 0.5) # A color of an RGBA(128, 128, 0, 255)
+ [/gdscript]
+ [csharp]
+ var c1 = new Color(1.0f, 0.0f, 0.0f);
+ var c2 = new Color(0.0f, 1.0f, 0.0f);
+ Color lerpColor = c1.Lerp(c2, 0.5f); // A color of an RGBA(128, 128, 0, 255)
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="lightened">
@@ -195,10 +274,16 @@
</argument>
<description>
Returns a new color resulting from making this color lighter by the specified percentage (ratio from 0 to 1).
- [codeblock]
+ [codeblocks]
+ [gdscript]
var green = Color(0.0, 1.0, 0.0)
var lightgreen = green.lightened(0.2) # 20% lighter than regular green
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var green = new Color(0.0f, 1.0f, 0.0f);
+ Color lightgreen = green.Lightened(0.2f); // 20% lighter than regular green
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="to_abgr32">
@@ -206,10 +291,16 @@
</return>
<description>
Returns the color's 32-bit integer in ABGR format (each byte represents a component of the ABGR profile). ABGR is the reversed version of the default format.
- [codeblock]
- var c = Color(1, 0.5, 0.2)
- print(c.to_abgr32()) # Prints 4281565439
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var color = Color(1, 0.5, 0.2)
+ print(color.to_abgr32()) # Prints 4281565439
+ [/gdscript]
+ [csharp]
+ var color = new Color(1.0f, 0.5f, 0.2f);
+ GD.Print(color.ToAbgr32()); // Prints 4281565439
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="to_abgr64">
@@ -217,10 +308,16 @@
</return>
<description>
Returns the color's 64-bit integer in ABGR format (each word represents a component of the ABGR profile). ABGR is the reversed version of the default format.
- [codeblock]
- var c = Color(1, 0.5, 0.2)
- print(c.to_abgr64()) # Prints -225178692812801
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var color = Color(1, 0.5, 0.2)
+ print(color.to_abgr64()) # Prints -225178692812801
+ [/gdscript]
+ [csharp]
+ var color = new Color(1.0f, 0.5f, 0.2f);
+ GD.Print(color.ToAbgr64()); // Prints -225178692812801
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="to_argb32">
@@ -228,10 +325,16 @@
</return>
<description>
Returns the color's 32-bit integer in ARGB format (each byte represents a component of the ARGB profile). ARGB is more compatible with DirectX.
- [codeblock]
- var c = Color(1, 0.5, 0.2)
- print(c.to_argb32()) # Prints 4294934323
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var color = Color(1, 0.5, 0.2)
+ print(color.to_argb32()) # Prints 4294934323
+ [/gdscript]
+ [csharp]
+ var color = new Color(1.0f, 0.5f, 0.2f);
+ GD.Print(color.ToArgb32()); // Prints 4294934323
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="to_argb64">
@@ -239,10 +342,16 @@
</return>
<description>
Returns the color's 64-bit integer in ARGB format (each word represents a component of the ARGB profile). ARGB is more compatible with DirectX.
- [codeblock]
- var c = Color(1, 0.5, 0.2)
- print(c.to_argb64()) # Prints -2147470541
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var color = Color(1, 0.5, 0.2)
+ print(color.to_argb64()) # Prints -2147470541
+ [/gdscript]
+ [csharp]
+ var color = new Color(1.0f, 0.5f, 0.2f);
+ GD.Print(color.ToArgb64()); // Prints -2147470541
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="to_html">
@@ -253,11 +362,18 @@
<description>
Returns the color's HTML hexadecimal color string in RGBA format (ex: [code]ff34f822[/code]).
Setting [code]with_alpha[/code] to [code]false[/code] excludes alpha from the hexadecimal string (and uses RGB instead of RGBA format).
- [codeblock]
- var c = Color(1, 1, 1, 0.5)
- var s1 = c.to_html() # Returns "ffffff7f"
- var s2 = c.to_html(false) # Returns "ffffff"
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var color = Color(1, 1, 1, 0.5)
+ var with_alpha = color.to_html() # Returns "ffffff7f"
+ var without_alpha = color.to_html(false) # Returns "ffffff"
+ [/gdscript]
+ [csharp]
+ var color = new Color(1, 1, 1, 0.5f);
+ String withAlpha = color.ToHtml(); // Returns "ffffff7f"
+ String withoutAlpha = color.ToHtml(false); // Returns "ffffff"
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="to_rgba32">
@@ -265,10 +381,16 @@
</return>
<description>
Returns the color's 32-bit integer in RGBA format (each byte represents a component of the RGBA profile). RGBA is Godot's default format.
- [codeblock]
- var c = Color(1, 0.5, 0.2)
- print(c.to_rgba32()) # Prints 4286526463
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var color = Color(1, 0.5, 0.2)
+ print(color.to_rgba32()) # Prints 4286526463
+ [/gdscript]
+ [csharp]
+ var color = new Color(1, 0.5f, 0.2f);
+ GD.Print(color.ToRgba32()); // Prints 4286526463
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="to_rgba64">
@@ -276,10 +398,16 @@
</return>
<description>
Returns the color's 64-bit integer in RGBA format (each word represents a component of the RGBA profile). RGBA is Godot's default format.
- [codeblock]
- var c = Color(1, 0.5, 0.2)
- print(c.to_rgba64()) # Prints -140736629309441
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var color = Color(1, 0.5, 0.2)
+ print(color.to_rgba64()) # Prints -140736629309441
+ [/gdscript]
+ [csharp]
+ var color = new Color(1, 0.5f, 0.2f);
+ GD.Print(color.ToRgba64()); // Prints -140736629309441
+ [/csharp]
+ [/codeblocks]
</description>
</method>
</methods>
diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml
index d8b4a8f76c..aea3542867 100644
--- a/doc/classes/ColorPicker.xml
+++ b/doc/classes/ColorPicker.xml
@@ -7,6 +7,7 @@
Displays a color picker widget. Useful for selecting a color from an RGB/RGBA colorspace.
</description>
<tutorials>
+ <link title="Tween Demo">https://godotengine.org/asset-library/asset/146</link>
</tutorials>
<methods>
<method name="add_preset">
diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml
index 67f64c8a66..76cc49a043 100644
--- a/doc/classes/ColorPickerButton.xml
+++ b/doc/classes/ColorPickerButton.xml
@@ -5,8 +5,11 @@
</brief_description>
<description>
Encapsulates a [ColorPicker] making it accessible by pressing a button. Pressing the button will toggle the [ColorPicker] visibility.
+ See also [BaseButton] which contains common properties and methods associated with this node.
</description>
<tutorials>
+ <link title="GUI Drag And Drop Demo">https://godotengine.org/asset-library/asset/133</link>
+ <link title="2D GD Paint Demo">https://godotengine.org/asset-library/asset/517</link>
</tutorials>
<methods>
<method name="get_picker">
diff --git a/doc/classes/ColorRect.xml b/doc/classes/ColorRect.xml
index 92f42b6dd3..072759e383 100644
--- a/doc/classes/ColorRect.xml
+++ b/doc/classes/ColorRect.xml
@@ -7,15 +7,21 @@
Displays a colored rectangle.
</description>
<tutorials>
+ <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
</methods>
<members>
<member name="color" type="Color" setter="set_frame_color" getter="get_frame_color" default="Color( 1, 1, 1, 1 )">
The fill color.
- [codeblock]
+ [codeblocks]
+ [gdscript]
$ColorRect.color = Color(1, 0, 0, 1) # Set ColorRect's color to red.
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ GetNode&lt;ColorRect&gt;("ColorRect").Color = new Color(1, 0, 0, 1); // Set ColorRect's color to red.
+ [/csharp]
+ [/codeblocks]
</member>
</members>
<constants>
diff --git a/doc/classes/ConcavePolygonShape3D.xml b/doc/classes/ConcavePolygonShape3D.xml
index 20402d350a..3e83202472 100644
--- a/doc/classes/ConcavePolygonShape3D.xml
+++ b/doc/classes/ConcavePolygonShape3D.xml
@@ -8,6 +8,7 @@
Note: when used for collision, [ConcavePolygonShape3D] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [KinematicBody3D] or [RigidBody3D] with a mode other than Static.
</description>
<tutorials>
+ <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
</tutorials>
<methods>
<method name="get_faces" qualifiers="const">
diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml
index 522d484131..da17d993e3 100644
--- a/doc/classes/ConfigFile.xml
+++ b/doc/classes/ConfigFile.xml
@@ -13,7 +13,8 @@
[/codeblock]
The stored data can be saved to or parsed from a file, though ConfigFile objects can also be used directly without accessing the filesystem.
The following example shows how to parse an INI-style file from the system, read its contents and store new values in it:
- [codeblock]
+ [codeblocks]
+ [gdscript]
var config = ConfigFile.new()
var err = config.load("user://settings.cfg")
if err == OK: # If not, something went wrong with the file loading
@@ -24,7 +25,24 @@
config.set_value("audio", "mute", false)
# Save the changes by overwriting the previous file
config.save("user://settings.cfg")
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var config = new ConfigFile();
+ Error err = config.Load("user://settings.cfg");
+ if (err == Error.Ok) // If not, something went wrong with the file loading
+ {
+ // Look for the display/width pair, and default to 1024 if missing
+ int screenWidth = (int)config.GetValue("display", "width", 1024);
+ // Store a variable if and only if it hasn't been defined yet
+ if (!config.HasSectionKey("audio", "mute"))
+ {
+ config.SetValue("audio", "mute", false);
+ }
+ // Save the changes by overwriting the previous file
+ config.Save("user://settings.cfg");
+ }
+ [/csharp]
+ [/codeblocks]
Keep in mind that section and property names can't contain spaces. Anything after a space will be ignored on save and on load.
ConfigFiles can also contain manually written comment lines starting with a semicolon ([code];[/code]). Those lines will be ignored when parsing the file. Note that comments will be lost when saving the ConfigFile. This can still be useful for dedicated server configuration files, which are typically never overwritten without explicit user action.
</description>
diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml
index 6d5871508b..a850afdd9f 100644
--- a/doc/classes/ConfirmationDialog.xml
+++ b/doc/classes/ConfirmationDialog.xml
@@ -6,9 +6,14 @@
<description>
Dialog for confirmation of actions. This dialog inherits from [AcceptDialog], but has by default an OK and Cancel button (in host OS order).
To get cancel action, you can use:
- [codeblock]
+ [codeblocks]
+ [gdscript]
get_cancel().connect("pressed", self, "cancelled")
- [/codeblock].
+ [/gdscript]
+ [csharp]
+ GetCancel().Connect("pressed", this, nameof(Cancelled));
+ [/csharp]
+ [/codeblocks]
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index c8e37d7d7b..f495bfe894 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -18,6 +18,7 @@
<tutorials>
<link title="GUI tutorial index">https://docs.godotengine.org/en/latest/tutorials/gui/index.html</link>
<link title="Custom drawing in 2D">https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link>
+ <link title="All GUI Demos">https://github.com/godotengine/godot-demo-projects/tree/master/gui</link>
</tutorials>
<methods>
<method name="_clips_input" qualifiers="virtual">
@@ -44,12 +45,27 @@
<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.
- [codeblock]
+ [codeblocks]
+ [gdscript]
func _gui_input(event):
if event is InputEventMouseButton:
if event.button_index == BUTTON_LEFT and event.pressed:
print("I've been clicked D:")
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public override void _GuiInput(InputEvent @event)
+ {
+ if (@event is InputEventMouseButton)
+ {
+ var mb = @event as InputEventMouseButton;
+ if (mb.ButtonIndex == (int)ButtonList.Left &amp;&amp; mb.Pressed)
+ {
+ GD.Print("I've been clicked D:");
+ }
+ }
+ }
+ [/csharp]
+ [/codeblocks]
The event won't trigger if:
* clicking outside the control (see [method has_point]);
* control has [member mouse_filter] set to [constant MOUSE_FILTER_IGNORE];
@@ -68,19 +84,39 @@
The returned node must be of type [Control] or Control-derieved. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance, not e.g. a node from scene. When [code]null[/code] or non-Control node is returned, the default tooltip will be used instead.
[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 rect_min_size] to some non-zero value.
Example of usage with custom-constructed node:
- [codeblock]
+ [codeblocks]
+ [gdscript]
func _make_custom_tooltip(for_text):
var label = Label.new()
label.text = for_text
return label
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public override Godot.Object _MakeCustomTooltip(String forText)
+ {
+ var label = new Label();
+ label.Text = forText;
+ return label;
+ }
+ [/csharp]
+ [/codeblocks]
Example of usage with custom scene instance:
- [codeblock]
+ [codeblocks]
+ [gdscript]
func _make_custom_tooltip(for_text):
var tooltip = preload("SomeTooltipScene.tscn").instance()
tooltip.get_node("Label").text = for_text
return tooltip
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public override Godot.Object _MakeCustomTooltip(String forText)
+ {
+ Node tooltip = ResourceLoader.Load&lt;PackedScene&gt;("SomeTooltipScene.tscn").Instance();
+ tooltip.GetNode&lt;Label&gt;("Label").Text = forText;
+ return tooltip;
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="accept_event">
@@ -101,14 +137,22 @@
Overrides the [Color] with given [code]name[/code] in the [member theme] resource the control uses.
[b]Note:[/b] Unlike other theme overrides, there is no way to undo a color override without manually assigning the previous color.
[b]Example of overriding a label's color and resetting it later:[/b]
- [codeblock]
+ [codeblocks]
+ [gdscript]
# Override the child node "MyLabel"'s font color to orange.
$MyLabel.add_theme_color_override("font_color", Color(1, 0.5, 0))
-
# Reset the color by creating a new node to get the default value:
var default_label_color = Label.new().get_theme_color("font_color")
$MyLabel.add_theme_color_override("font_color", default_label_color)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ // Override the child node "MyLabel"'s font color to orange.
+ GetNode&lt;Label&gt;("MyLabel").AddThemeColorOverride("font_color", new Color(1, 0.5f, 0));
+ // Reset the color by creating a new node to get the default value:
+ var defaultLabelColor = new Label().GetThemeColor("font_color");
+ GetNode&lt;Label&gt;("MyLabel").AddThemeColorOverride("font_color", defaultLabelColor);
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="add_theme_constant_override">
@@ -165,7 +209,8 @@
<description>
Overrides the [StyleBox] with given [code]name[/code] in the [member theme] resource the control uses. If [code]stylebox[/code] is empty or invalid, the override is cleared and the [StyleBox] from assigned [Theme] is used.
[b]Example of modifying a property in a StyleBox by duplicating it:[/b]
- [codeblock]
+ [codeblocks]
+ [gdscript]
# The snippet below assumes the child node MyButton has a StyleBoxFlat assigned.
# Resources are shared across instances, so we need to duplicate it
# to avoid modifying the appearance of all other buttons.
@@ -173,10 +218,21 @@
new_stylebox_normal.border_width_top = 3
new_stylebox_normal.border_color = Color(0, 1, 0.5)
$MyButton.add_theme_stylebox_override("normal", new_stylebox_normal)
-
# Remove the stylebox override:
$MyButton.add_theme_stylebox_override("normal", null)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ // The snippet below assumes the child node MyButton has a StyleBoxFlat assigned.
+ // Resources are shared across instances, so we need to duplicate it
+ // to avoid modifying the appearance of all other buttons.
+ StyleBoxFlat newStyleboxNormal = GetNode&lt;Button&gt;("MyButton").GetThemeStylebox("normal").Duplicate() as StyleBoxFlat;
+ newStyleboxNormal.BorderWidthTop = 3;
+ newStyleboxNormal.BorderColor = new Color(0, 1, 0.5f);
+ GetNode&lt;Button&gt;("MyButton").AddThemeStyleboxOverride("normal", newStyleboxNormal);
+ // Remove the stylebox override:
+ GetNode&lt;Button&gt;("MyButton").AddThemeStyleboxOverride("normal", null);
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="can_drop_data" qualifiers="virtual">
@@ -189,12 +245,22 @@
<description>
Godot calls this method to test if [code]data[/code] from a control's [method get_drag_data] can be dropped at [code]position[/code]. [code]position[/code] is local to this control.
This method should only be used to test the data. Process the data in [method drop_data].
- [codeblock]
+ [codeblocks]
+ [gdscript]
func can_drop_data(position, data):
# Check position if it is relevant to you
# Otherwise, just check data
return typeof(data) == TYPE_DICTIONARY and data.has("expected")
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public override bool CanDropData(Vector2 position, object data)
+ {
+ // Check position if it is relevant to you
+ // Otherwise, just check data
+ return data is Godot.Collections.Dictionary &amp;&amp; (data as Godot.Collections.Dictionary).Contains("expected");
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="drop_data" qualifiers="virtual">
@@ -206,13 +272,24 @@
</argument>
<description>
Godot calls this method to pass you the [code]data[/code] from a control's [method get_drag_data] result. Godot first calls [method can_drop_data] to test if [code]data[/code] is allowed to drop at [code]position[/code] where [code]position[/code] is local to this control.
- [codeblock]
+ [codeblocks]
+ [gdscript]
func can_drop_data(position, data):
return typeof(data) == TYPE_DICTIONARY and data.has("color")
-
func drop_data(position, data):
- color = data["color"]
- [/codeblock]
+ var color = data["color"]
+ [/gdscript]
+ [csharp]
+ public override bool CanDropData(Vector2 position, object data)
+ {
+ return data is Godot.Collections.Dictionary &amp;&amp; (data as Godot.Collections.Dictionary).Contains("color");
+ }
+ public override void DropData(Vector2 position, object data)
+ {
+ Color color = (Color)(data as Godot.Collections.Dictionary)["color"];
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="force_drag">
@@ -267,12 +344,22 @@
<description>
Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns [code]null[/code] if there is no data to drag. Controls that want to receive drop data should implement [method can_drop_data] and [method drop_data]. [code]position[/code] is local to this control. Drag may be forced with [method force_drag].
A preview that will follow the mouse that should represent the data can be set with [method set_drag_preview]. A good time to set the preview is in this method.
- [codeblock]
+ [codeblocks]
+ [gdscript]
func get_drag_data(position):
- var mydata = make_data()
- set_drag_preview(make_preview(mydata))
+ var mydata = make_data() # This is your custom method generating the drag data.
+ set_drag_preview(make_preview(mydata)) # This is your custom method generating the preview of the drag data.
return mydata
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public override object GetDragData(Vector2 position)
+ {
+ object mydata = MakeData(); // This is your custom method generating the drag data.
+ SetDragPreview(MakePreview(mydata)); // This is your custom method generating the preview of the drag data.
+ return mydata;
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_end" qualifiers="const">
@@ -358,10 +445,18 @@
</argument>
<description>
Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]type[/code].
- [codeblock]
+ [codeblocks]
+ [gdscript]
func _ready():
modulate = get_theme_color("font_color", "Button") #get the color defined for button fonts
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public override void _Ready()
+ {
+ Modulate = GetThemeColor("font_color", "Button"); //get the color defined for button fonts
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="get_theme_constant" qualifiers="const">
@@ -422,10 +517,18 @@
</return>
<description>
Creates an [InputEventMouseButton] that attempts to click the control. If the event is received, the control acquires focus.
- [codeblock]
+ [codeblocks]
+ [gdscript]
func _process(delta):
grab_click_focus() #when clicking another Control node, this node will be clicked instead
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ public override void _Process(float delta)
+ {
+ GrabClickFocus(); //when clicking another Control node, this node will be clicked instead
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="grab_focus">
@@ -566,7 +669,7 @@
<return type="void">
</return>
<description>
- Invalidates the size cache in this node and in parent nodes up to toplevel. Intended to be used with [method get_minimum_size] when the return value is changed. Setting [member rect_min_size] directly calls this method automatically.
+ Invalidates the size cache in this node and in parent nodes up to top_level. Intended to be used with [method get_minimum_size] when the return value is changed. Setting [member rect_min_size] directly calls this method automatically.
</description>
</method>
<method name="release_focus">
@@ -652,24 +755,61 @@
Forwarding can be implemented in the target control similar to the methods [method get_drag_data], [method can_drop_data], and [method drop_data] but with two differences:
1. The function name must be suffixed with [b]_fw[/b]
2. The function must take an extra argument that is the control doing the forwarding
- [codeblock]
+ [codeblocks]
+ [gdscript]
# ThisControl.gd
extends Control
+ export(Control) var target_control
+
func _ready():
set_drag_forwarding(target_control)
# TargetControl.gd
extends Control
+
func can_drop_data_fw(position, data, from_control):
return true
func drop_data_fw(position, data, from_control):
- my_handle_data(data)
+ my_handle_data(data) # Your handler method.
func get_drag_data_fw(position, from_control):
set_drag_preview(my_preview)
return my_data()
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ // ThisControl.cs
+ public class ThisControl : Control
+ {
+ [Export]
+ public Control TargetControl { get; set; }
+ public override void _Ready()
+ {
+ SetDragForwarding(TargetControl);
+ }
+ }
+
+ // TargetControl.cs
+ public class TargetControl : Control
+ {
+ public void CanDropDataFw(Vector2 position, object data, Control fromControl)
+ {
+ return true;
+ }
+
+ public void DropDataFw(Vector2 position, object data, Control fromControl)
+ {
+ MyHandleData(data); // Your handler method.
+ }
+
+ public void GetDragDataFw(Vector2 position, Control fromControl)
+ {
+ SetDragPreview(MyPreview);
+ return MyData();
+ }
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="set_drag_preview">
@@ -679,7 +819,8 @@
</argument>
<description>
Shows the given control at the mouse pointer. A good time to call this method is in [method get_drag_data]. The control must not be in the scene tree.
- [codeblock]
+ [codeblocks]
+ [gdscript]
export (Color, RGBA) var color = Color(1, 0, 0, 1)
func get_drag_data(position):
@@ -689,7 +830,22 @@
cpb.rect_size = Vector2(50, 50)
set_drag_preview(cpb)
return color
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ [Export]
+ public Color Color = new Color(1, 0, 0, 1);
+
+ public override object GetDragData(Vector2 position)
+ {
+ // Use a control that is not in the tree
+ var cpb = new ColorPickerButton();
+ cpb.Color = Color;
+ cpb.RectSize = new Vector2(50, 50);
+ SetDragPreview(cpb);
+ return Color;
+ }
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="set_end">
diff --git a/doc/classes/ConvexPolygonShape3D.xml b/doc/classes/ConvexPolygonShape3D.xml
index c036f80e2d..e18d716255 100644
--- a/doc/classes/ConvexPolygonShape3D.xml
+++ b/doc/classes/ConvexPolygonShape3D.xml
@@ -7,6 +7,7 @@
Convex polygon shape resource, which can be added to a [PhysicsBody3D] or area.
</description>
<tutorials>
+ <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml
index 4edb3eda0a..b3bbbae94f 100644
--- a/doc/classes/Crypto.xml
+++ b/doc/classes/Crypto.xml
@@ -6,13 +6,12 @@
<description>
The Crypto class allows you to access some more advanced cryptographic functionalities in Godot.
For now, this includes generating cryptographically secure random bytes, RSA keys and self-signed X509 certificates generation, asymmetric key encryption/decryption, and signing/verification.
- [codeblock]
+ [codeblocks]
+ [gdscript]
extends Node
-
var crypto = Crypto.new()
var key = CryptoKey.new()
var cert = X509Certificate.new()
-
func _ready():
# Generate new RSA key.
key = crypto.generate_rsa(4096)
@@ -33,7 +32,42 @@
# Checks
assert(verified)
assert(data.to_utf8() == decrypted)
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ using Godot;
+ using System;
+ using System.Diagnostics;
+
+ public class CryptoNode : Node
+ {
+ public Crypto Crypto = new Crypto();
+ public CryptoKey Key = new CryptoKey();
+ public X509Certificate Cert = new X509Certificate();
+ public override void _Ready()
+ {
+ // Generate new RSA key.
+ Key = Crypto.GenerateRsa(4096);
+ // Generate new self-signed certificate with the given key.
+ Cert = Crypto.GenerateSelfSignedCertificate(Key, "CN=mydomain.com,O=My Game Company,C=IT");
+ // Save key and certificate in the user folder.
+ Key.Save("user://generated.key");
+ Cert.Save("user://generated.crt");
+ // Encryption
+ string data = "Some data";
+ byte[] encrypted = Crypto.Encrypt(Key, data.ToUTF8());
+ // Decryption
+ byte[] decrypted = Crypto.Decrypt(Key, encrypted);
+ // Signing
+ byte[] signature = Crypto.Sign(HashingContext.HashType.Sha256, Data.SHA256Buffer(), Key);
+ // Verifying
+ bool verified = Crypto.Verify(HashingContext.HashType.Sha256, Data.SHA256Buffer(), signature, Key);
+ // Checks
+ Debug.Assert(verified);
+ Debug.Assert(data.ToUTF8() == decrypted);
+ }
+ }
+ [/csharp]
+ [/codeblocks]
[b]Note:[/b] Not available in HTML5 exports.
</description>
<tutorials>
@@ -95,13 +129,22 @@
<description>
Generates a self-signed [X509Certificate] from the given [CryptoKey] and [code]issuer_name[/code]. The certificate validity will be defined by [code]not_before[/code] and [code]not_after[/code] (first valid date and last valid date). The [code]issuer_name[/code] must contain at least "CN=" (common name, i.e. the domain name), "O=" (organization, i.e. your company name), "C=" (country, i.e. 2 lettered ISO-3166 code of the country the organization is based in).
A small example to generate an RSA key and a X509 self-signed certificate.
- [codeblock]
+ [codeblocks]
+ [gdscript]
var crypto = Crypto.new()
# Generate 4096 bits RSA key.
var key = crypto.generate_rsa(4096)
# Generate self-signed certificate using the given key.
var cert = crypto.generate_self_signed_certificate(key, "CN=example.com,O=A Game Company,C=IT")
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var crypto = new Crypto();
+ // Generate 4096 bits RSA key.
+ CryptoKey key = crypto.GenerateRsa(4096);
+ // Generate self-signed certificate using the given key.
+ X509Certificate cert = crypto.GenerateSelfSignedCertificate(key, "CN=mydomain.com,O=My Game Company,C=IT");
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="sign">
diff --git a/doc/classes/CylinderShape3D.xml b/doc/classes/CylinderShape3D.xml
index eb12568e71..99334ceae6 100644
--- a/doc/classes/CylinderShape3D.xml
+++ b/doc/classes/CylinderShape3D.xml
@@ -7,6 +7,9 @@
Cylinder shape for collisions.
</description>
<tutorials>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
+ <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index 7123deb206..cb60d6e621 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -74,6 +74,8 @@
</description>
<tutorials>
<link title="GDScript basics: Dictionary">https://docs.godotengine.org/en/latest/getting_started/scripting/gdscript/gdscript_basics.html#dictionary</link>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
+ <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
</tutorials>
<methods>
<method name="clear">
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index 28194587ab..53776b7752 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -521,6 +521,18 @@
<argument index="0" name="screen" type="int" default="-1">
</argument>
<description>
+ Returns the dots per inch density of the specified screen. If [code]screen[/code] is [/code]SCREEN_OF_MAIN_WINDOW[/code] (the default value), a screen with the main window will be used.
+ [b]Note:[/b] On macOS, returned value is inaccurate if fractional display scaling mode is used.
+ [b]Note:[/b] On Android devices, the actual screen densities are grouped into six generalized densities:
+ [codeblock]
+ ldpi - 120 dpi
+ mdpi - 160 dpi
+ hdpi - 240 dpi
+ xhdpi - 320 dpi
+ 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.
</description>
</method>
<method name="screen_get_max_scale" qualifiers="const">
diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml
index b0635892be..f687937e27 100644
--- a/doc/classes/DynamicFont.xml
+++ b/doc/classes/DynamicFont.xml
@@ -15,6 +15,7 @@
[b]Note:[/b] DynamicFont doesn't support features such as kerning, right-to-left typesetting, ligatures, text shaping, variable fonts and optional font features yet. If you wish to "bake" an optional font feature into a TTF font file, you can use [url=https://fontforge.org/]FontForge[/url] to do so. In FontForge, use [b]File &gt; Generate Fonts[/b], click [b]Options[/b], choose the desired features then generate the font.
</description>
<tutorials>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
<method name="add_fallback">
@@ -96,10 +97,12 @@
Extra spacing at the bottom in pixels.
</member>
<member name="extra_spacing_char" type="int" setter="set_spacing" getter="get_spacing" default="0">
- Extra character spacing in pixels.
+ Extra spacing for each character in pixels.
+ This can be a negative number to make the distance between characters smaller.
</member>
<member name="extra_spacing_space" type="int" setter="set_spacing" getter="get_spacing" default="0">
- Extra space spacing in pixels.
+ Extra spacing for the space character (in addition to [member extra_spacing_char]) in pixels.
+ This can be a negative number to make the distance between words smaller.
</member>
<member name="extra_spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0">
Extra spacing at the top in pixels.
@@ -126,10 +129,10 @@
Spacing at the bottom.
</constant>
<constant name="SPACING_CHAR" value="2" enum="SpacingType">
- Character spacing.
+ Spacing for each character.
</constant>
<constant name="SPACING_SPACE" value="3" enum="SpacingType">
- Space spacing.
+ Spacing for the space character.
</constant>
</constants>
</class>
diff --git a/doc/classes/DynamicFontData.xml b/doc/classes/DynamicFontData.xml
index 483da96f3f..45585f17e0 100644
--- a/doc/classes/DynamicFontData.xml
+++ b/doc/classes/DynamicFontData.xml
@@ -7,6 +7,7 @@
Used with [DynamicFont] to describe the location of a vector font file for dynamic rendering at runtime.
</description>
<tutorials>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index b290557336..2a7f27ef55 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
EditorImportPlugins provide a way to extend the editor's resource import functionality. Use them to import resources from custom files or to provide alternatives to the editor's existing importers. Register your [EditorPlugin] with [method EditorPlugin.add_import_plugin].
- EditorImportPlugins work by associating with specific file extensions and a resource type. See [method get_recognized_extensions] and [method get_resource_type]. They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the [code].import[/code] directory.
+ EditorImportPlugins work by associating with specific file extensions and a resource type. See [method get_recognized_extensions] and [method get_resource_type]. They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the [code].godot/imported[/code] directory.
Below is an example EditorImportPlugin that imports a [Mesh] from a file with the extension ".special" or ".spec":
[codeblock]
tool
@@ -136,7 +136,7 @@
<return type="String">
</return>
<description>
- Gets the extension used to save this resource in the [code].import[/code] directory.
+ Gets the extension used to save this resource in the [code].godot/imported[/code] directory.
</description>
</method>
<method name="get_visible_name" qualifiers="virtual">
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
index 9da36b51f9..c7561449b9 100644
--- a/doc/classes/EditorInterface.xml
+++ b/doc/classes/EditorInterface.xml
@@ -125,8 +125,10 @@
</argument>
<argument index="1" name="for_property" type="String" default="&quot;&quot;">
</argument>
+ <argument index="2" name="inspector_only" type="bool" default="false">
+ </argument>
<description>
- Shows the given property on the given [code]object[/code] in the editor's Inspector dock.
+ Shows the given property on the given [code]object[/code] in the editor's Inspector dock. If [code]inspector_only[/code] is [code]true[/code], plugins will not attempt to edit [code]object[/code].
</description>
</method>
<method name="is_playing_scene" qualifiers="const">
diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml
index 8865939eb1..4dea1bb645 100644
--- a/doc/classes/EditorNode3DGizmoPlugin.xml
+++ b/doc/classes/EditorNode3DGizmoPlugin.xml
@@ -136,7 +136,7 @@
</description>
</method>
<method name="get_priority" qualifiers="virtual">
- <return type="String">
+ <return type="int">
</return>
<description>
Override this method to set the gizmo's priority. Higher values correspond to higher priority. If a gizmo with higher priority conflicts with another gizmo, only the gizmo with higher priority will be used.
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index caee6a0c07..8afc18f91b 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -13,6 +13,9 @@
<tutorials>
<link title="Environment and post-processing">https://docs.godotengine.org/en/latest/tutorials/3d/environment_and_post_processing.html</link>
<link title="Light transport in game engines">https://docs.godotengine.org/en/latest/tutorials/3d/high_dynamic_range.html</link>
+ <link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link>
+ <link title="2D HDR Demo">https://godotengine.org/asset-library/asset/110</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="is_glow_level_enabled" qualifiers="const">
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index 1982406993..ada57a8114 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -21,9 +21,11 @@
return content
[/codeblock]
In the example above, the file will be saved in the user data folder as specified in the [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]Data paths[/url] documentation.
+ [b]Note:[/b] To access project resources once exported, it is recommended to use [ResourceLoader] instead of the [File] API, as some files are converted to engine-specific formats and their original source files might not be present in the exported PCK package.
</description>
<tutorials>
<link title="File system">https://docs.godotengine.org/en/latest/getting_started/step_by_step/filesystem.html</link>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
<method name="close">
@@ -48,7 +50,7 @@
</argument>
<description>
Returns [code]true[/code] if the file exists in the given path.
- [b]Note:[/b] Many resources types are imported (e.g. textures or sound files), and that their source asset will not be included in the exported game, as only the imported version is used (in the [code]res://.import[/code] folder). To check for the existence of such resources while taking into account the remapping to their imported location, use [method ResourceLoader.exists]. Typically, using [code]File.file_exists[/code] on an imported resource would work while you are developing in the editor (the source asset is present in [code]res://[/code], but fail when exported).
+ [b]Note:[/b] Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. See [method ResourceLoader.exists] for an alternative approach that takes resource remapping into account.
</description>
</method>
<method name="get_16" qualifiers="const">
@@ -398,8 +400,7 @@
<argument index="0" name="line" type="String">
</argument>
<description>
- Stores the given [String] as a line in the file.
- Text will be encoded as UTF-8.
+ Appends [code]line[/code] to the file followed by a line return character ([code]\n[/code]), encoding the text as UTF-8.
</description>
</method>
<method name="store_pascal_string">
@@ -427,8 +428,7 @@
<argument index="0" name="string" type="String">
</argument>
<description>
- Stores the given [String] in the file.
- Text will be encoded as UTF-8.
+ Appends [code]string[/code] to the file without a line return, encoding the text as UTF-8.
</description>
</method>
<method name="store_var">
diff --git a/doc/classes/FuncRef.xml b/doc/classes/FuncRef.xml
index bf0c0b0d34..7c01397c24 100644
--- a/doc/classes/FuncRef.xml
+++ b/doc/classes/FuncRef.xml
@@ -14,7 +14,7 @@
<return type="Variant">
</return>
<description>
- Calls the referenced function previously set by [method set_function] or [method @GDScript.funcref].
+ Calls the referenced function previously set in [member function] or [method @GDScript.funcref].
</description>
</method>
<method name="call_funcv">
@@ -23,35 +23,31 @@
<argument index="0" name="arg_array" type="Array">
</argument>
<description>
- Calls the referenced function previously set by [method set_function] or [method @GDScript.funcref]. Contrarily to [method call_func], this method does not support a variable number of arguments but expects all parameters to be passed via a single [Array].
+ Calls the referenced function previously set in [member function] or [method @GDScript.funcref]. Contrarily to [method call_func], this method does not support a variable number of arguments but expects all parameters to be passed via a single [Array].
</description>
</method>
- <method name="is_valid" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether the object still exists and has the function assigned.
- </description>
- </method>
- <method name="set_function">
+ <method name="set_instance">
<return type="void">
</return>
- <argument index="0" name="name" type="StringName">
+ <argument index="0" name="instance" type="Object">
</argument>
<description>
- The name of the referenced function to call on the object, without parentheses or any parameters.
+ The object containing the referenced function. This object must be of a type actually inheriting from [Object], not a built-in type such as [int], [Vector2] or [Dictionary].
</description>
</method>
- <method name="set_instance">
- <return type="void">
+ <method name="is_valid" qualifiers="const">
+ <return type="bool">
</return>
- <argument index="0" name="instance" type="Object">
- </argument>
<description>
- The object containing the referenced function. This object must be of a type actually inheriting from [Object], not a built-in type such as [int], [Vector2] or [Dictionary].
+ Returns whether the object still exists and has the function assigned.
</description>
</method>
</methods>
+ <members>
+ <member name="function" type="StringName" setter="set_function" getter="get_function">
+ The name of the referenced function.
+ </member>
+ </members>
<constants>
</constants>
</class>
diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml
index 9199468ab3..52d3698201 100644
--- a/doc/classes/GIProbe.xml
+++ b/doc/classes/GIProbe.xml
@@ -9,6 +9,7 @@
</description>
<tutorials>
<link title="GI probes">https://docs.godotengine.org/en/latest/tutorials/3d/gi_probes.html</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="bake">
diff --git a/doc/classes/GIProbeData.xml b/doc/classes/GIProbeData.xml
index 228e1afb4c..693df8f819 100644
--- a/doc/classes/GIProbeData.xml
+++ b/doc/classes/GIProbeData.xml
@@ -5,6 +5,7 @@
<description>
</description>
<tutorials>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="allocate">
diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml
index 244bdcf2f3..ba201af5db 100644
--- a/doc/classes/GPUParticles2D.xml
+++ b/doc/classes/GPUParticles2D.xml
@@ -9,6 +9,7 @@
</description>
<tutorials>
<link title="Particle systems (2D)">https://docs.godotengine.org/en/latest/tutorials/2d/particle_systems_2d.html</link>
+ <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
<method name="capture_rect" qualifiers="const">
diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml
index 8444610f49..e840e457bf 100644
--- a/doc/classes/GPUParticles3D.xml
+++ b/doc/classes/GPUParticles3D.xml
@@ -9,6 +9,7 @@
</description>
<tutorials>
<link title="Controlling thousands of fish with Particles">https://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/controlling_thousands_of_fish.html</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="capture_aabb" qualifiers="const">
diff --git a/doc/classes/GridContainer.xml b/doc/classes/GridContainer.xml
index 6ee794c5c4..ca6b4e69c3 100644
--- a/doc/classes/GridContainer.xml
+++ b/doc/classes/GridContainer.xml
@@ -9,6 +9,7 @@
[b]Note:[/b] GridContainer only works with child nodes inheriting from Control. It won't rearrange child nodes inheriting from Node2D.
</description>
<tutorials>
+ <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml
index b05ab5b4d6..fb0ed8ff62 100644
--- a/doc/classes/Input.xml
+++ b/doc/classes/Input.xml
@@ -8,6 +8,8 @@
</description>
<tutorials>
<link title="Inputs tutorial index">https://docs.godotengine.org/en/latest/tutorials/inputs/index.html</link>
+ <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
<method name="action_press">
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
index 3663ee98cc..8c6063bd67 100644
--- a/doc/classes/InputEvent.xml
+++ b/doc/classes/InputEvent.xml
@@ -9,6 +9,8 @@
<tutorials>
<link title="InputEvent">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link>
<link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link>
+ <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
<method name="accumulate">
diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml
index e0d3e47219..1fe85a5ae8 100644
--- a/doc/classes/InputEventAction.xml
+++ b/doc/classes/InputEventAction.xml
@@ -8,6 +8,8 @@
</description>
<tutorials>
<link title="InputEvent: Actions">https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html#actions</link>
+ <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml
index 3e64fd63ab..0f9e71adb4 100644
--- a/doc/classes/InputEventMouseMotion.xml
+++ b/doc/classes/InputEventMouseMotion.xml
@@ -9,6 +9,7 @@
</description>
<tutorials>
<link title="Mouse and input coordinates">https://docs.godotengine.org/en/latest/tutorials/inputs/mouse_and_input_coordinates.html</link>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/Joint3D.xml b/doc/classes/Joint3D.xml
index 15bef960f6..107c638b9e 100644
--- a/doc/classes/Joint3D.xml
+++ b/doc/classes/Joint3D.xml
@@ -7,6 +7,7 @@
Joints are used to bind together two physics bodies. They have a solver priority and can define if the bodies of the two attached nodes should be able to collide with each other.
</description>
<tutorials>
+ <link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/524</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml
index 5a1b4630d0..17c4b85346 100644
--- a/doc/classes/KinematicBody2D.xml
+++ b/doc/classes/KinematicBody2D.xml
@@ -6,11 +6,13 @@
<description>
Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses:
[b]Simulated motion:[/b] When these bodies are moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to "physics"), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
- [b]Kinematic characters:[/b] KinematicBody2D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics.
+ [b]Kinematic characters:[/b] KinematicBody2D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but don't require advanced physics.
</description>
<tutorials>
<link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link>
<link title="Using KinematicBody2D">https://docs.godotengine.org/en/latest/tutorials/physics/using_kinematic_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>
<methods>
<method name="get_floor_normal" qualifiers="const">
@@ -33,7 +35,7 @@
<argument index="0" name="slide_idx" type="int">
</argument>
<description>
- Returns a [KinematicCollision2D], which contains information about a collision that occurred during the last [method move_and_slide] call. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1).
+ Returns a [KinematicCollision2D], which contains information about a collision that occurred during the last call to [method move_and_slide] or [method move_and_slide_with_snap]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1).
[b]Example usage:[/b]
[codeblock]
for i in get_slide_count():
@@ -46,28 +48,28 @@
<return type="int">
</return>
<description>
- Returns the number of times the body collided and changed direction during the last call to [method move_and_slide].
+ Returns the number of times the body collided and changed direction during the last call to [method move_and_slide] or [method move_and_slide_with_snap].
</description>
</method>
<method name="is_on_ceiling" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if the body is on the ceiling. Only updates when calling [method move_and_slide].
+ Returns [code]true[/code] if the body is on the ceiling. Only updates when calling [method move_and_slide] or [method move_and_slide_with_snap].
</description>
</method>
<method name="is_on_floor" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if the body is on the floor. Only updates when calling [method move_and_slide].
+ Returns [code]true[/code] if the body is on the floor. Only updates when calling [method move_and_slide] or [method move_and_slide_with_snap].
</description>
</method>
<method name="is_on_wall" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if the body is on a wall. Only updates when calling [method move_and_slide].
+ Returns [code]true[/code] if the body is on a wall. Only updates when calling [method move_and_slide] or [method move_and_slide_with_snap].
</description>
</method>
<method name="move_and_collide">
@@ -102,7 +104,7 @@
<argument index="5" name="infinite_inertia" type="bool" default="true">
</argument>
<description>
- Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
+ Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.
This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
[code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
[code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games.
diff --git a/doc/classes/KinematicBody3D.xml b/doc/classes/KinematicBody3D.xml
index 5d9c7fd896..17a6034e9a 100644
--- a/doc/classes/KinematicBody3D.xml
+++ b/doc/classes/KinematicBody3D.xml
@@ -6,10 +6,14 @@
<description>
Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses:
[b]Simulated motion:[/b] When these bodies are moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to "physics"), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc).
- [b]Kinematic characters:[/b] KinematicBody3D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics.
+ [b]Kinematic characters:[/b] KinematicBody3D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but don't require advanced physics.
</description>
<tutorials>
<link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link>
+ <link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link>
+ <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="get_axis_lock" qualifiers="const">
@@ -41,35 +45,35 @@
<argument index="0" name="slide_idx" type="int">
</argument>
<description>
- Returns a [KinematicCollision3D], which contains information about a collision that occurred during the last [method move_and_slide] call. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1).
+ Returns a [KinematicCollision3D], which contains information about a collision that occurred during the last call to [method move_and_slide] or [method move_and_slide_with_snap]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1).
</description>
</method>
<method name="get_slide_count" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the number of times the body collided and changed direction during the last call to [method move_and_slide].
+ Returns the number of times the body collided and changed direction during the last call to [method move_and_slide] or [method move_and_slide_with_snap].
</description>
</method>
<method name="is_on_ceiling" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if the body is on the ceiling. Only updates when calling [method move_and_slide].
+ Returns [code]true[/code] if the body is on the ceiling. Only updates when calling [method move_and_slide] or [method move_and_slide_with_snap].
</description>
</method>
<method name="is_on_floor" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if the body is on the floor. Only updates when calling [method move_and_slide].
+ Returns [code]true[/code] if the body is on the floor. Only updates when calling [method move_and_slide] or [method move_and_slide_with_snap].
</description>
</method>
<method name="is_on_wall" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if the body is on a wall. Only updates when calling [method move_and_slide].
+ Returns [code]true[/code] if the body is on a wall. Only updates when calling [method move_and_slide] or [method move_and_slide_with_snap].
</description>
</method>
<method name="move_and_collide">
@@ -104,7 +108,7 @@
<argument index="5" name="infinite_inertia" type="bool" default="true">
</argument>
<description>
- Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody3D] or [RigidBody3D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
+ Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [KinematicBody3D] or [RigidBody3D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.
This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
[code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
[code]up_direction[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall.
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index 3318f2757d..570d7f075b 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -8,6 +8,7 @@
[b]Note:[/b] Contrarily to most other [Control]s, Label's [member Control.mouse_filter] defaults to [constant Control.MOUSE_FILTER_IGNORE] (i.e. it doesn't react to mouse input events). This implies that a label won't display any configured [member Control.hint_tooltip], unless you change its mouse filter.
</description>
<tutorials>
+ <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
<method name="get_line_count" qualifiers="const">
diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml
index c022e56a39..6c008e4f7e 100644
--- a/doc/classes/Light3D.xml
+++ b/doc/classes/Light3D.xml
@@ -8,6 +8,7 @@
</description>
<tutorials>
<link title="3D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="get_param" qualifiers="const">
diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml
index 22fe4f6194..dec5d60cbb 100644
--- a/doc/classes/Line2D.xml
+++ b/doc/classes/Line2D.xml
@@ -7,6 +7,8 @@
A line through several points in 2D space.
</description>
<tutorials>
+ <link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link>
+ <link title="2.5D Demo">https://godotengine.org/asset-library/asset/583</link>
</tutorials>
<methods>
<method name="add_point">
diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml
index 13d3355da5..fed936cc2f 100644
--- a/doc/classes/LinkButton.xml
+++ b/doc/classes/LinkButton.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
This kind of button is primarily used when the interaction with the button causes a context change (like linking to a web page).
+ See also [BaseButton] which contains common properties and methods associated with this node.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml
index f3686876ca..10a7061bef 100644
--- a/doc/classes/Material.xml
+++ b/doc/classes/Material.xml
@@ -7,6 +7,8 @@
Material is a base [Resource] used for coloring and shading geometry. All materials inherit from it and almost all [VisualInstance3D] derived nodes carry a Material. A few flags and parameters are shared between all material types and are configured here.
</description>
<tutorials>
+ <link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml
index 316315f777..cf1fdb5ba6 100644
--- a/doc/classes/MenuButton.xml
+++ b/doc/classes/MenuButton.xml
@@ -6,6 +6,7 @@
<description>
Special button that brings up a [PopupMenu] when clicked.
New items can be created inside this [PopupMenu] using [code]get_popup().add_item("My Item Name")[/code]. You can also create them directly from the editor. To do so, select the [MenuButton] node, then in the toolbar at the top of the 2D editor, click [b]Items[/b] then click [b]Add[/b] in the popup. You will be able to give each items new properties.
+ See also [BaseButton] which contains common properties and methods associated with this node.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml
index 1efa72a2b2..78db09feee 100644
--- a/doc/classes/Mesh.xml
+++ b/doc/classes/Mesh.xml
@@ -7,6 +7,10 @@
Mesh is a type of [Resource] that 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.
</description>
<tutorials>
+ <link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link>
+ <link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link>
+ <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="create_convex_shape" qualifiers="const">
diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml
index c569da2df1..82cd392cd3 100644
--- a/doc/classes/MeshInstance3D.xml
+++ b/doc/classes/MeshInstance3D.xml
@@ -7,6 +7,10 @@
MeshInstance3D is a node that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single [Mesh] in many places. This allows reuse of geometry which can save on resources. When a [Mesh] has to be instanced more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance3D] instead.
</description>
<tutorials>
+ <link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link>
+ <link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link>
+ <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="create_convex_collision">
diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml
index ccf6172017..ad8bd6991d 100644
--- a/doc/classes/MeshLibrary.xml
+++ b/doc/classes/MeshLibrary.xml
@@ -7,6 +7,8 @@
A library of meshes. Contains a list of [Mesh] resources, each with a name and ID. Each item can also include collision and navigation shapes. This resource is used in [GridMap].
</description>
<tutorials>
+ <link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/126</link>
+ <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
</tutorials>
<methods>
<method name="clear">
diff --git a/doc/classes/Navigation2D.xml b/doc/classes/Navigation2D.xml
index dcbfbc2350..abac29bdb7 100644
--- a/doc/classes/Navigation2D.xml
+++ b/doc/classes/Navigation2D.xml
@@ -7,6 +7,7 @@
Navigation2D provides navigation and pathfinding within a 2D area, specified as a collection of [NavigationPolygon] resources. These are automatically collected from child [NavigationRegion2D] nodes.
</description>
<tutorials>
+ <link title="2D Navigation Demo">https://godotengine.org/asset-library/asset/117</link>
</tutorials>
<methods>
<method name="get_closest_point" qualifiers="const">
diff --git a/doc/classes/Navigation3D.xml b/doc/classes/Navigation3D.xml
index 807f0ad309..e7a4fe3c43 100644
--- a/doc/classes/Navigation3D.xml
+++ b/doc/classes/Navigation3D.xml
@@ -7,6 +7,7 @@
Provides navigation and pathfinding within a collection of [NavigationMesh]es. These will be automatically collected from child [NavigationRegion3D] nodes. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on.
</description>
<tutorials>
+ <link title="3D Navmesh Demo">https://godotengine.org/asset-library/asset/124</link>
</tutorials>
<methods>
<method name="get_closest_point" qualifiers="const">
diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml
index a2fa31bf65..dd7464ac0e 100644
--- a/doc/classes/NavigationMesh.xml
+++ b/doc/classes/NavigationMesh.xml
@@ -5,6 +5,7 @@
<description>
</description>
<tutorials>
+ <link title="3D Navmesh Demo">https://godotengine.org/asset-library/asset/124</link>
</tutorials>
<methods>
<method name="add_polygon">
diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml
index b0f77dff83..e75efa3b27 100644
--- a/doc/classes/NavigationPolygon.xml
+++ b/doc/classes/NavigationPolygon.xml
@@ -24,6 +24,7 @@
[/codeblock]
</description>
<tutorials>
+ <link title="2D Navigation Demo">https://godotengine.org/asset-library/asset/117</link>
</tutorials>
<methods>
<method name="add_outline">
diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml
index 1b9099336c..5f0b04487e 100644
--- a/doc/classes/NavigationServer2D.xml
+++ b/doc/classes/NavigationServer2D.xml
@@ -7,6 +7,7 @@
NavigationServer2D is the server responsible for all 2D navigation. It creates the agents, maps, and regions for navigation to work as expected. This keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying.
</description>
<tutorials>
+ <link title="2D Navigation Demo">https://godotengine.org/asset-library/asset/117</link>
</tutorials>
<methods>
<method name="agent_create" qualifiers="const">
diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml
index 1f621c3c81..95890c4b4c 100644
--- a/doc/classes/NavigationServer3D.xml
+++ b/doc/classes/NavigationServer3D.xml
@@ -7,6 +7,7 @@
NavigationServer3D is the server responsible for all 3D navigation. It creates the agents, maps, and regions for navigation to work as expected. This keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying.
</description>
<tutorials>
+ <link title="3D Navmesh Demo">https://godotengine.org/asset-library/asset/124</link>
</tutorials>
<methods>
<method name="agent_create" qualifiers="const">
diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml
index 7e2a9af59f..954d31794a 100644
--- a/doc/classes/NetworkedMultiplayerPeer.xml
+++ b/doc/classes/NetworkedMultiplayerPeer.xml
@@ -8,6 +8,7 @@
</description>
<tutorials>
<link title="High-level multiplayer">https://docs.godotengine.org/en/latest/tutorials/networking/high_level_multiplayer.html</link>
+ <link title="WebRTC Signaling Demo">https://godotengine.org/asset-library/asset/537</link>
</tutorials>
<methods>
<method name="get_connection_status" qualifiers="const">
diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml
index 9c3acc9b0a..08ab01036c 100644
--- a/doc/classes/NinePatchRect.xml
+++ b/doc/classes/NinePatchRect.xml
@@ -45,13 +45,13 @@
The height of the 9-slice'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>
<member name="patch_margin_left" type="int" setter="set_patch_margin" getter="get_patch_margin" default="0">
- The height of the 9-slice's left column.
+ The width of the 9-slice's left column. A margin of 16 means the 9-slice's left corners and side will have a width of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders.
</member>
<member name="patch_margin_right" type="int" setter="set_patch_margin" getter="get_patch_margin" default="0">
- The height of the 9-slice's right column.
+ The width of the 9-slice's right column. A margin of 16 means the 9-slice's right corners and side will have a width of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders.
</member>
<member name="patch_margin_top" type="int" setter="set_patch_margin" getter="get_patch_margin" default="0">
- The height of the 9-slice's top row.
+ The height of the 9-slice's top row. A margin of 16 means the 9-slice's top 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>
<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )">
Rectangular region of the texture to sample from. If you're working with an atlas, use this property to define the area the 9-slice should use. All other properties are relative to this one. If the rect is empty, NinePatchRect will use the whole texture.
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 1548800901..623e4b099b 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -18,6 +18,7 @@
</description>
<tutorials>
<link title="Scenes and nodes">https://docs.godotengine.org/en/latest/getting_started/step_by_step/scenes_and_nodes.html</link>
+ <link title="All Demos">https://github.com/godotengine/godot-demo-projects/</link>
</tutorials>
<methods>
<method name="_enter_tree" qualifiers="virtual">
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index 987a18f367..eed0ec8d7e 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -8,6 +8,7 @@
</description>
<tutorials>
<link title="Custom drawing in 2D">https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link>
+ <link title="All 2D Demos">https://github.com/godotengine/godot-demo-projects/tree/master/2d</link>
</tutorials>
<methods>
<method name="apply_scale">
diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml
index 1ef875f606..af4f18c5f7 100644
--- a/doc/classes/Node3D.xml
+++ b/doc/classes/Node3D.xml
@@ -10,6 +10,7 @@
</description>
<tutorials>
<link title="Introduction to 3D">https://docs.godotengine.org/en/latest/tutorials/3d/introduction_to_3d.html</link>
+ <link title="All 3D Demos">https://github.com/godotengine/godot-demo-projects/tree/master/3d</link>
</tutorials>
<methods>
<method name="force_update_transform">
@@ -83,13 +84,6 @@
Returns whether this node uses a scale of [code](1, 1, 1)[/code] or its local transformation scale.
</description>
</method>
- <method name="is_set_as_toplevel" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether this node is set as Toplevel, that is whether it ignores its parent nodes transformations.
- </description>
- </method>
<method name="is_transform_notification_enabled" qualifiers="const">
<return type="bool">
</return>
@@ -195,15 +189,6 @@
Scales the local transformation by given 3D scale factors in object-local coordinate system.
</description>
</method>
- <method name="set_as_toplevel">
- <return type="void">
- </return>
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Makes the node ignore its parents transformations. Node transformations are only in global space.
- </description>
- </method>
<method name="set_disable_scale">
<return type="void">
</return>
@@ -316,6 +301,9 @@
<member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3( 1, 1, 1 )">
Scale part of the local transformation.
</member>
+ <member name="top_level" type="bool" setter="set_as_top_level" getter="is_set_as_top_level">
+ If [code]true[/code], the node will not inherit its transformations from its parent. Node transformations are only in global space.
+ </member>
<member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
Local space [Transform] of this node, with respect to the parent node.
</member>
diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml
index dc7fd1be3f..658f0e6c28 100644
--- a/doc/classes/NodePath.xml
+++ b/doc/classes/NodePath.xml
@@ -22,6 +22,7 @@
[/codeblock]
</description>
<tutorials>
+ <link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link>
</tutorials>
<methods>
<method name="NodePath">
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 26110df335..1487c9e078 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -7,6 +7,7 @@
Operating System functions. OS wraps the most common functionality to communicate with the host operating system, such as the clipboard, video driver, date and time, timers, environment variables, execution of binaries, command line, etc.
</description>
<tutorials>
+ <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
</tutorials>
<methods>
<method name="can_use_threads" qualifiers="const">
@@ -234,13 +235,6 @@
Returns the number of threads available on the host machine.
</description>
</method>
- <method name="get_splash_tick_msec" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the amount of time in milliseconds it took for the boot logo to appear.
- </description>
- </method>
<method name="get_static_memory_peak_usage" qualifiers="const">
<return type="int">
</return>
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index 8c4bbd6716..510f952fea 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -5,6 +5,7 @@
</brief_description>
<description>
OptionButton is a type button that provides a selectable list of items when pressed. The item selected becomes the "current" item and is displayed as the button text.
+ See also [BaseButton] which contains common properties and methods associated with this node.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
index bb56330248..be40ab05de 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -38,6 +38,7 @@
[/codeblock]
</description>
<tutorials>
+ <link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link>
</tutorials>
<methods>
<method name="can_instance" qualifiers="const">
diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml
index f36af66d6d..5f3a16ac73 100644
--- a/doc/classes/PackedStringArray.xml
+++ b/doc/classes/PackedStringArray.xml
@@ -8,6 +8,7 @@
[b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
+ <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
</tutorials>
<methods>
<method name="PackedStringArray">
diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml
index ecc535e488..cb62aea95c 100644
--- a/doc/classes/PackedVector2Array.xml
+++ b/doc/classes/PackedVector2Array.xml
@@ -8,6 +8,7 @@
[b]Note:[/b] This type is passed by value and not by reference.
</description>
<tutorials>
+ <link title="2D Navigation Astar Demo">https://godotengine.org/asset-library/asset/519</link>
</tutorials>
<methods>
<method name="PackedVector2Array">
diff --git a/doc/classes/Panel.xml b/doc/classes/Panel.xml
index 7285bc9e2e..b65c2c956d 100644
--- a/doc/classes/Panel.xml
+++ b/doc/classes/Panel.xml
@@ -7,6 +7,9 @@
Panel is a [Control] that displays an opaque background. It's commonly used as a parent and container for other types of [Control] nodes.
</description>
<tutorials>
+ <link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link>
+ <link title="2D Finite State Machine Demo">https://godotengine.org/asset-library/asset/516</link>
+ <link title="3D Inverse Kinematics Demo">https://godotengine.org/asset-library/asset/523</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/PanelContainer.xml b/doc/classes/PanelContainer.xml
index d39122c395..ad6080c780 100644
--- a/doc/classes/PanelContainer.xml
+++ b/doc/classes/PanelContainer.xml
@@ -7,6 +7,7 @@
Panel container type. This container fits controls inside of the delimited area of a stylebox. It's useful for giving controls an outline.
</description>
<tutorials>
+ <link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index ed8eddda07..54c337faf9 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -9,6 +9,9 @@
[b]Overriding:[/b] Any project setting can be overridden by creating a file named [code]override.cfg[/code] in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary.
</description>
<tutorials>
+ <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
+ <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
+ <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
</tutorials>
<methods>
<method name="add_property_info">
@@ -555,6 +558,9 @@
<member name="input_devices/pointing/emulate_touch_from_mouse" type="bool" setter="" getter="" default="false">
If [code]true[/code], sends touch input events when clicking or dragging the mouse.
</member>
+ <member name="input_devices/pointing/ios/touch_delay" type="float" setter="" getter="" default="0.150">
+ Default delay for touch events. This only affects iOS devices.
+ </member>
<member name="layer_names/2d_physics/layer_1" type="String" setter="" getter="" default="&quot;&quot;">
Optional name for the 2D physics layer 1.
</member>
diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml
index 422add08d1..24a3d76ee2 100644
--- a/doc/classes/QuadMesh.xml
+++ b/doc/classes/QuadMesh.xml
@@ -7,6 +7,8 @@
Class representing a square [PrimitiveMesh]. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Y axes; this default rotation is more suited for use with billboarded materials. Unlike [PlaneMesh], this mesh doesn't provide subdivision options.
</description>
<tutorials>
+ <link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link>
+ <link title="2D in 3D Demo">https://godotengine.org/asset-library/asset/129</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml
index 2218852dae..6c95e303b8 100644
--- a/doc/classes/Quat.xml
+++ b/doc/classes/Quat.xml
@@ -10,6 +10,7 @@
</description>
<tutorials>
<link title="Using 3D transforms">https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html#interpolating-with-quaternions</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="Quat">
diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml
index 1d8edf0adb..d24e86a08b 100644
--- a/doc/classes/RayCast3D.xml
+++ b/doc/classes/RayCast3D.xml
@@ -12,6 +12,7 @@
</description>
<tutorials>
<link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
<method name="add_exception">
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index 2d1685871d..aaeaa7629d 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -10,6 +10,8 @@
</description>
<tutorials>
<link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
+ <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
+ <link title="Advanced vector math">https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html</link>
</tutorials>
<methods>
<method name="Rect2">
diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml
index 809f385f6e..8b29daa264 100644
--- a/doc/classes/Rect2i.xml
+++ b/doc/classes/Rect2i.xml
@@ -9,6 +9,7 @@
</description>
<tutorials>
<link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
+ <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
</tutorials>
<methods>
<method name="Rect2i">
diff --git a/doc/classes/RectangleShape2D.xml b/doc/classes/RectangleShape2D.xml
index b42cc48d43..041416a24b 100644
--- a/doc/classes/RectangleShape2D.xml
+++ b/doc/classes/RectangleShape2D.xml
@@ -7,6 +7,8 @@
Rectangle shape for 2D collisions. This shape is useful for modeling box-like 2D objects.
</description>
<tutorials>
+ <link title="2D Pong Demo">https://godotengine.org/asset-library/asset/121</link>
+ <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml
index 1cf775f389..049613fa5d 100644
--- a/doc/classes/ResourceLoader.xml
+++ b/doc/classes/ResourceLoader.xml
@@ -6,9 +6,9 @@
<description>
Singleton used to load resource files from the filesystem.
It uses the many [ResourceFormatLoader] classes registered in the engine (either built-in or from a plugin) to load files into memory and convert them to a format that can be used by the engine.
- GDScript has a simplified [method @GDScript.load] built-in method which can be used in most situations, leaving the use of [ResourceLoader] for more advanced scenarios.
</description>
<tutorials>
+ <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
</tutorials>
<methods>
<method name="exists">
@@ -65,7 +65,8 @@
The registered [ResourceFormatLoader]s are queried sequentially to find the first one which can handle the file's extension, and then attempt loading. If loading fails, the remaining ResourceFormatLoaders are also attempted.
An optional [code]type_hint[/code] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader].
If [code]no_cache[/code] is [code]true[/code], the resource cache will be bypassed and the resource will be loaded anew. Otherwise, the cached resource will be returned if it exists.
- Returns an empty resource if no ResourceFormatLoader could handle the file.
+ Returns an empty resource if no [ResourceFormatLoader] could handle the file.
+ GDScript has a simplified [method @GDScript.load] built-in method which can be used in most situations, leaving the use of [ResourceLoader] for more advanced scenarios.
</description>
</method>
<method name="load_threaded_get">
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 050f1aab25..faf0d97766 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -10,6 +10,8 @@
</description>
<tutorials>
<link title="BBCode in RichTextLabel">https://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link>
+ <link title="GUI Rich Text/BBcode Demo">https://godotengine.org/asset-library/asset/132</link>
+ <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link>
</tutorials>
<methods>
<method name="add_image">
diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml
index f3d43b193e..eca5b8054d 100644
--- a/doc/classes/RigidBody2D.xml
+++ b/doc/classes/RigidBody2D.xml
@@ -12,6 +12,8 @@
The center of mass is always located at the node's origin without taking into account the [CollisionShape2D] centroid offsets.
</description>
<tutorials>
+ <link title="2D Physics Platformer Demo">https://godotengine.org/asset-library/asset/119</link>
+ <link title="Instancing Demo">https://godotengine.org/asset-library/asset/148</link>
</tutorials>
<methods>
<method name="_integrate_forces" qualifiers="virtual">
@@ -136,7 +138,7 @@
</member>
<member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" default="0">
The maximum number of contacts that will be recorded. Requires [member contact_monitor] to be set to [code]true[/code].
- [b]Note:[/b] The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner).
+ [b]Note:[/b] The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end).
</member>
<member name="continuous_cd" type="int" setter="set_continuous_collision_detection_mode" getter="get_continuous_collision_detection_mode" enum="RigidBody2D.CCDMode" default="0">
Continuous collision detection mode.
diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidBody3D.xml
index e9ebf33aa7..8d92c8b066 100644
--- a/doc/classes/RigidBody3D.xml
+++ b/doc/classes/RigidBody3D.xml
@@ -12,6 +12,8 @@
</description>
<tutorials>
<link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link>
+ <link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/524</link>
+ <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
</tutorials>
<methods>
<method name="_integrate_forces" qualifiers="virtual">
diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml
index 7ec8fe12fb..fe2cc1f5ad 100644
--- a/doc/classes/Skeleton3D.xml
+++ b/doc/classes/Skeleton3D.xml
@@ -9,6 +9,8 @@
Note that "global pose" below refers to the overall transform of the bone with respect to skeleton, so it not the actual global/world transform of the bone.
</description>
<tutorials>
+ <link title="3D Inverse Kinematics Demo">https://godotengine.org/asset-library/asset/523</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="add_bone">
diff --git a/doc/classes/SkeletonIK3D.xml b/doc/classes/SkeletonIK3D.xml
index de83847403..5193109447 100644
--- a/doc/classes/SkeletonIK3D.xml
+++ b/doc/classes/SkeletonIK3D.xml
@@ -5,6 +5,7 @@
<description>
</description>
<tutorials>
+ <link title="3D Inverse Kinematics Demo">https://godotengine.org/asset-library/asset/523</link>
</tutorials>
<methods>
<method name="get_parent_skeleton" qualifiers="const">
diff --git a/doc/classes/SphereShape3D.xml b/doc/classes/SphereShape3D.xml
index 1eaf890639..e90493fca2 100644
--- a/doc/classes/SphereShape3D.xml
+++ b/doc/classes/SphereShape3D.xml
@@ -7,6 +7,7 @@
Sphere shape for 3D collisions, which can be set into a [PhysicsBody3D] or [Area3D]. This shape is useful for modeling sphere-like 3D objects.
</description>
<tutorials>
+ <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/SpotLight3D.xml b/doc/classes/SpotLight3D.xml
index fc849baa8d..f868503bbd 100644
--- a/doc/classes/SpotLight3D.xml
+++ b/doc/classes/SpotLight3D.xml
@@ -8,6 +8,7 @@
</description>
<tutorials>
<link title="3D lights and shadows">https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/Sprite2D.xml b/doc/classes/Sprite2D.xml
index f218631038..8205889ea7 100644
--- a/doc/classes/Sprite2D.xml
+++ b/doc/classes/Sprite2D.xml
@@ -7,6 +7,7 @@
A node that displays a 2D texture. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation.
</description>
<tutorials>
+ <link title="Instancing Demo">https://godotengine.org/asset-library/asset/148</link>
</tutorials>
<methods>
<method name="get_rect" qualifiers="const">
diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml
index 934471c445..f9b947fa3d 100644
--- a/doc/classes/Sprite3D.xml
+++ b/doc/classes/Sprite3D.xml
@@ -4,8 +4,7 @@
2D sprite node in a 3D world.
</brief_description>
<description>
- A node that displays a 2D texture in a 3D environment. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation.
- [b]Note:[/b] There are [url=https://github.com/godotengine/godot/issues/20855]known performance issues[/url] when using [Sprite3D]. Consider using a [MeshInstance3D] with a [QuadMesh] as the mesh instead. You can still have billboarding by enabling billboard properties in the QuadMesh's [StandardMaterial3D].
+ A node that displays a 2D texture in a 3D environment. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation. See also [SpriteBase3D] where properties such as the billboard mode are defined.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml
index 479dc5f94c..44b08408c1 100644
--- a/doc/classes/SpriteBase3D.xml
+++ b/doc/classes/SpriteBase3D.xml
@@ -4,7 +4,7 @@
2D sprite node in 3D environment.
</brief_description>
<description>
- A node that displays 2D texture information in a 3D environment.
+ A node that displays 2D texture information in a 3D environment. See also [Sprite3D] where many other properties are defined.
</description>
<tutorials>
</tutorials>
@@ -13,6 +13,7 @@
<return type="TriangleMesh">
</return>
<description>
+ Returns a [TriangleMesh] with the sprite's vertices following its current configuration (such as its [member axis] and [member pixel_size]).
</description>
</method>
<method name="get_draw_flag" qualifiers="const">
@@ -39,17 +40,19 @@
<argument index="1" name="enabled" type="bool">
</argument>
<description>
- If [code]true[/code], the specified flag will be enabled.
+ If [code]true[/code], the specified flag will be enabled. See [enum SpriteBase3D.DrawFlags] for a list of flags.
</description>
</method>
</methods>
<members>
<member name="alpha_cut" type="int" setter="set_alpha_cut_mode" getter="get_alpha_cut_mode" enum="SpriteBase3D.AlphaCutMode" default="0">
+ The alpha cutting mode to use for the sprite. See [enum AlphaCutMode] for possible values.
</member>
<member name="axis" type="int" setter="set_axis" getter="get_axis" enum="Vector3.Axis" default="2">
The direction in which the front of the texture faces.
</member>
<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 sprite. See [enum BaseMaterial3D.BillboardMode] for possible values.
</member>
<member name="centered" type="bool" setter="set_centered" getter="is_centered" default="true">
If [code]true[/code], texture will be centered.
@@ -90,16 +93,19 @@
If set, lights in the environment affect the sprite.
</constant>
<constant name="FLAG_DOUBLE_SIDED" value="2" enum="DrawFlags">
- If set, texture can be seen from the back as well, if not, it is invisible when looking at it from behind.
+ If set, texture can be seen from the back as well. If not, the texture is invisible when looking at it from behind.
</constant>
<constant name="FLAG_MAX" value="3" enum="DrawFlags">
Represents the size of the [enum DrawFlags] enum.
</constant>
<constant name="ALPHA_CUT_DISABLED" value="0" enum="AlphaCutMode">
+ This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping.
</constant>
<constant name="ALPHA_CUT_DISCARD" value="1" enum="AlphaCutMode">
+ This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see [member ProjectSettings.rendering/quality/screen_filters/screen_space_aa]). On the bright side, this mode doesn't suffer from transparency sorting issues when multiple transparent materials are overlapping. This mode is also known as [i]alpha testing[/i] or [i]1-bit transparency[/i].
</constant>
<constant name="ALPHA_CUT_OPAQUE_PREPASS" value="2" enum="AlphaCutMode">
+ This mode draws fully opaque pixels in the depth prepass. This is slower than [constant ALPHA_CUT_DISABLED] or [constant ALPHA_CUT_DISCARD], but it allows displaying translucent areas and smooth edges while using proper sorting.
</constant>
</constants>
</class>
diff --git a/doc/classes/StaticBody3D.xml b/doc/classes/StaticBody3D.xml
index c896efc314..63a15cbe1d 100644
--- a/doc/classes/StaticBody3D.xml
+++ b/doc/classes/StaticBody3D.xml
@@ -8,6 +8,9 @@
Additionally, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
</description>
<tutorials>
+ <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index 40fff25fc4..4034a5ee07 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -342,7 +342,10 @@
<argument index="0" name="to" type="String">
</argument>
<description>
- Performs a case-sensitive comparison to another string. Returns [code]-1[/code] if less than, [code]+1[/code] if greater than, or [code]0[/code] if equal.
+ Performs a case-sensitive comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/code] of each string, which roughly matches the alphabetical order.
+ [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [code]to[/code] string or [code]-1[/code] if the "base" string is shorter than the [code]to[/code] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters.
+ [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [code]to[/code] string is empty or [code]0[/code] if both strings are empty.
+ To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method nocasecmp_to] and [method naturalnocasecmp_to].
</description>
</method>
<method name="count">
@@ -615,7 +618,7 @@
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if this string contains a valid IP address.
+ Returns [code]true[/code] if this string contains only a well-formatted IPv4 or IPv6 address. This method considers [url=https://en.wikipedia.org/wiki/Reserved_IP_addresses]reserved IP addresses[/url] such as [code]0.0.0.0[/code] as valid.
</description>
</method>
<method name="join">
@@ -712,7 +715,11 @@
<argument index="0" name="to" type="String">
</argument>
<description>
- Performs a case-insensitive natural order comparison to another string. Returns [code]-1[/code] if less than, [code]+1[/code] if greater than, or [code]0[/code] if equal.
+ Performs a case-insensitive [i]natural order[/i] comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/code] of each string, which roughly matches the alphabetical order. Internally, lowercase characters will be converted to uppercase during the comparison.
+ When used for sorting, natural order comparison will order suites of numbers as expected by most people. If you sort the numbers from 1 to 10 using natural order, you will get [code][1, 2, 3, ...][/code] instead of [code][1, 10, 2, 3, ...][/code].
+ [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [code]to[/code] string or [code]-1[/code] if the "base" string is shorter than the [code]to[/code] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters.
+ [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [code]to[/code] string is empty or [code]0[/code] if both strings are empty.
+ To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method nocasecmp_to] and [method casecmp_to].
</description>
</method>
<method name="nocasecmp_to">
@@ -721,7 +728,10 @@
<argument index="0" name="to" type="String">
</argument>
<description>
- Performs a case-insensitive comparison to another string. Returns [code]-1[/code] if less than, [code]+1[/code] if greater than, or [code]0[/code] if equal.
+ Performs a case-insensitive comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/code] of each string, which roughly matches the alphabetical order. Internally, lowercase characters will be converted to uppercase during the comparison.
+ [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [code]to[/code] string or [code]-1[/code] if the "base" string is shorter than the [code]to[/code] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters.
+ [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [code]to[/code] string is empty or [code]0[/code] if both strings are empty.
+ To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method casecmp_to] and [method naturalnocasecmp_to].
</description>
</method>
<method name="ord_at">
diff --git a/doc/classes/SubViewport.xml b/doc/classes/SubViewport.xml
index c9c7589631..4736401395 100644
--- a/doc/classes/SubViewport.xml
+++ b/doc/classes/SubViewport.xml
@@ -1,10 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="SubViewport" inherits="Viewport" version="4.0">
<brief_description>
+ Creates a sub-view into the screen.
</brief_description>
<description>
</description>
<tutorials>
+ <link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link>
+ <link title="Viewports tutorial index">https://docs.godotengine.org/en/latest/tutorials/viewports/index.html</link>
+ <link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link>
+ <link title="3D in 2D Demo">https://godotengine.org/asset-library/asset/128</link>
+ <link title="2D in 3D Demo">https://godotengine.org/asset-library/asset/129</link>
+ <link title="Screen Capture Demo">https://godotengine.org/asset-library/asset/130</link>
+ <link title="Dynamic Split Screen Demo">https://godotengine.org/asset-library/asset/541</link>
+ <link title="3D Viewport Scaling Demo">https://godotengine.org/asset-library/asset/586</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index eeb6b6cd9d..385e31ccc7 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -19,6 +19,7 @@
[b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes.
</description>
<tutorials>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
<method name="add_bones">
diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml
index a5172586fe..70bf138f27 100644
--- a/doc/classes/TextureButton.xml
+++ b/doc/classes/TextureButton.xml
@@ -6,8 +6,10 @@
<description>
[TextureButton] has the same functionality as [Button], except it uses sprites instead of Godot's [Theme] resource. It is faster to create, but it doesn't support localization like more complex [Control]s.
The "normal" state must contain a texture ([member texture_normal]); other textures are optional.
+ See also [BaseButton] which contains common properties and methods associated with this node.
</description>
<tutorials>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml
index 709d87b858..743e7f6d1e 100644
--- a/doc/classes/TextureRect.xml
+++ b/doc/classes/TextureRect.xml
@@ -7,6 +7,7 @@
Used to draw icons and sprites in a user interface. The texture's placement can be controlled with the [member stretch_mode] property. It can scale, tile, or stay centered inside its bounding rectangle.
</description>
<tutorials>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml
index 46377ecf20..88f46e3937 100644
--- a/doc/classes/Thread.xml
+++ b/doc/classes/Thread.xml
@@ -10,6 +10,7 @@
<tutorials>
<link title="Using multiple threads">https://docs.godotengine.org/en/latest/tutorials/threads/using_multiple_threads.html</link>
<link title="Thread-safe APIs">https://docs.godotengine.org/en/latest/tutorials/threads/thread_safe_apis.html</link>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
<method name="get_id" qualifiers="const">
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index 2780545f55..371ba80723 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -8,6 +8,12 @@
</description>
<tutorials>
<link title="Using Tilemaps">https://docs.godotengine.org/en/latest/tutorials/2d/using_tilemaps.html</link>
+ <link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link>
+ <link title="2D Isometric Demo">https://godotengine.org/asset-library/asset/112</link>
+ <link title="2D Hexagonal Demo">https://godotengine.org/asset-library/asset/111</link>
+ <link title="2D Navigation Astar Demo">https://godotengine.org/asset-library/asset/519</link>
+ <link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link>
+ <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link>
</tutorials>
<methods>
<method name="clear">
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index 4991a1e58b..9ab9d9ca7a 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -8,6 +8,13 @@
Tiles are referenced by a unique integer ID.
</description>
<tutorials>
+ <link title="Using Tilemaps">https://docs.godotengine.org/en/latest/tutorials/2d/using_tilemaps.html</link>
+ <link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link>
+ <link title="2D Isometric Demo">https://godotengine.org/asset-library/asset/112</link>
+ <link title="2D Hexagonal Demo">https://godotengine.org/asset-library/asset/111</link>
+ <link title="2D Navigation Astar Demo">https://godotengine.org/asset-library/asset/519</link>
+ <link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link>
+ <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link>
</tutorials>
<methods>
<method name="_forward_atlas_subtile_selection" qualifiers="virtual">
diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml
index 5d684755fa..ab75e21ce8 100644
--- a/doc/classes/Timer.xml
+++ b/doc/classes/Timer.xml
@@ -8,6 +8,7 @@
[b]Note:[/b] To create an one-shot timer without instantiating a node, use [method SceneTree.create_timer].
</description>
<tutorials>
+ <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
<method name="is_stopped" qualifiers="const">
diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml
index 09dfe56f8f..52dda75dff 100644
--- a/doc/classes/Transform.xml
+++ b/doc/classes/Transform.xml
@@ -11,6 +11,9 @@
<link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
<link title="Matrices and transforms">https://docs.godotengine.org/en/latest/tutorials/math/matrices_and_transforms.html</link>
<link title="Using 3D transforms">https://docs.godotengine.org/en/latest/tutorials/3d/using_transforms.html</link>
+ <link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link>
+ <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
+ <link title="2.5D Demo">https://godotengine.org/asset-library/asset/583</link>
</tutorials>
<methods>
<method name="Transform">
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index 5da88892fe..b23bb4d33b 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -8,7 +8,10 @@
For more information, read the "Matrices and transforms" documentation article.
</description>
<tutorials>
+ <link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
<link title="Matrices and transforms">https://docs.godotengine.org/en/latest/tutorials/math/matrices_and_transforms.html</link>
+ <link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link>
+ <link title="2.5D Demo">https://godotengine.org/asset-library/asset/583</link>
</tutorials>
<methods>
<method name="Transform2D">
diff --git a/doc/classes/VBoxContainer.xml b/doc/classes/VBoxContainer.xml
index 6b32a08f93..213f8fd742 100644
--- a/doc/classes/VBoxContainer.xml
+++ b/doc/classes/VBoxContainer.xml
@@ -7,6 +7,7 @@
Vertical box container. See [BoxContainer].
</description>
<tutorials>
+ <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 52d719b6f7..025d6474ee 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -10,6 +10,11 @@
</description>
<tutorials>
<link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
+ <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
+ <link title="Advanced vector math">https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html</link>
+ <link title="3Blue1Brown Essence of Linear Algebra">https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab</link>
+ <link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link>
+ <link title="All 2D Demos">https://github.com/godotengine/godot-demo-projects/tree/master/2d</link>
</tutorials>
<methods>
<method name="Vector2">
@@ -182,7 +187,7 @@
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if the vector is normalized, and false otherwise.
+ Returns [code]true[/code] if the vector is normalized, [code]false[/code] otherwise.
</description>
</method>
<method name="length">
diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml
index 3ad926210b..75ddc46dab 100644
--- a/doc/classes/Vector2i.xml
+++ b/doc/classes/Vector2i.xml
@@ -10,6 +10,8 @@
</description>
<tutorials>
<link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
+ <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
+ <link title="3Blue1Brown Essence of Linear Algebra">https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab</link>
</tutorials>
<methods>
<method name="Vector2i">
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 608b976f6f..b26fe09e91 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -10,6 +10,11 @@
</description>
<tutorials>
<link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
+ <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
+ <link title="Advanced vector math">https://docs.godotengine.org/en/latest/tutorials/math/vectors_advanced.html</link>
+ <link title="3Blue1Brown Essence of Linear Algebra">https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab</link>
+ <link title="Matrix Transform Demo">https://godotengine.org/asset-library/asset/584</link>
+ <link title="All 3D Demos">https://github.com/godotengine/godot-demo-projects/tree/master/3d</link>
</tutorials>
<methods>
<method name="Vector3">
@@ -157,7 +162,7 @@
<return type="bool">
</return>
<description>
- Returns [code]true[/code] if the vector is normalized, and false otherwise.
+ Returns [code]true[/code] if the vector is normalized, [code]false[/code] otherwise.
</description>
</method>
<method name="length">
diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml
index bd7c354241..f977b81ce7 100644
--- a/doc/classes/Vector3i.xml
+++ b/doc/classes/Vector3i.xml
@@ -10,6 +10,8 @@
</description>
<tutorials>
<link title="Math tutorial index">https://docs.godotengine.org/en/latest/tutorials/math/index.html</link>
+ <link title="Vector math">https://docs.godotengine.org/en/latest/tutorials/math/vector_math.html</link>
+ <link title="3Blue1Brown Essence of Linear Algebra">https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab</link>
</tutorials>
<methods>
<method name="Vector3i">
diff --git a/doc/classes/VehicleBody3D.xml b/doc/classes/VehicleBody3D.xml
index 5a2cce376e..1125a1da94 100644
--- a/doc/classes/VehicleBody3D.xml
+++ b/doc/classes/VehicleBody3D.xml
@@ -9,6 +9,7 @@
[b]Note:[/b] This class has known issues and isn't designed to provide realistic 3D vehicle physics. If you want advanced vehicle physics, you will probably have to write your own physics integration using another [PhysicsBody3D] class.
</description>
<tutorials>
+ <link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/524</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/VehicleWheel3D.xml b/doc/classes/VehicleWheel3D.xml
index 97b2abfa92..fb0cb03d1c 100644
--- a/doc/classes/VehicleWheel3D.xml
+++ b/doc/classes/VehicleWheel3D.xml
@@ -8,6 +8,7 @@
[b]Note:[/b] This class has known issues and isn't designed to provide realistic 3D vehicle physics. If you want advanced vehicle physics, you will probably have to write your own physics integration using another [PhysicsBody3D] class.
</description>
<tutorials>
+ <link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/524</link>
</tutorials>
<methods>
<method name="get_rpm" qualifiers="const">
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index e42c4021ab..84974874de 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -14,6 +14,12 @@
<tutorials>
<link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link>
<link title="Viewports tutorial index">https://docs.godotengine.org/en/latest/tutorials/viewports/index.html</link>
+ <link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link>
+ <link title="3D in 2D Demo">https://godotengine.org/asset-library/asset/128</link>
+ <link title="2D in 3D Demo">https://godotengine.org/asset-library/asset/129</link>
+ <link title="Screen Capture Demo">https://godotengine.org/asset-library/asset/130</link>
+ <link title="Dynamic Split Screen Demo">https://godotengine.org/asset-library/asset/541</link>
+ <link title="3D Viewport Scaling Demo">https://godotengine.org/asset-library/asset/586</link>
</tutorials>
<methods>
<method name="find_world_2d" qualifiers="const">
diff --git a/doc/classes/ViewportTexture.xml b/doc/classes/ViewportTexture.xml
index 14b460a43b..393f1bb0b8 100644
--- a/doc/classes/ViewportTexture.xml
+++ b/doc/classes/ViewportTexture.xml
@@ -8,6 +8,10 @@
To create a ViewportTexture in code, use the [method Viewport.get_texture] method on the target viewport.
</description>
<tutorials>
+ <link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link>
+ <link title="3D in 2D Demo">https://godotengine.org/asset-library/asset/128</link>
+ <link title="2D in 3D Demo">https://godotengine.org/asset-library/asset/129</link>
+ <link title="3D Viewport Scaling Demo">https://godotengine.org/asset-library/asset/586</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/VisibilityNotifier2D.xml b/doc/classes/VisibilityNotifier2D.xml
index 314a100989..761438b77e 100644
--- a/doc/classes/VisibilityNotifier2D.xml
+++ b/doc/classes/VisibilityNotifier2D.xml
@@ -9,6 +9,7 @@
[b]Note:[/b] For performance reasons, VisibilityNotifier2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need precise visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node.
</description>
<tutorials>
+ <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
</tutorials>
<methods>
<method name="is_on_screen" qualifiers="const">
diff --git a/doc/classes/VisualShaderNodeMultiplyAdd.xml b/doc/classes/VisualShaderNodeMultiplyAdd.xml
index ba79b3fe8f..daa9e02753 100644
--- a/doc/classes/VisualShaderNodeMultiplyAdd.xml
+++ b/doc/classes/VisualShaderNodeMultiplyAdd.xml
@@ -11,19 +11,19 @@
<methods>
</methods>
<members>
- <member name="type" type="int" setter="set_type" getter="get_type" enum="VisualShaderNodeMultiplyAdd.Type" default="0">
+ <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeMultiplyAdd.OpType" default="0">
A type of operands and returned value.
</member>
</members>
<constants>
- <constant name="TYPE_SCALAR" value="0" enum="Type">
+ <constant name="OP_TYPE_SCALAR" value="0" enum="OpType">
A scalar type.
</constant>
- <constant name="TYPE_VECTOR" value="1" enum="Type">
+ <constant name="OP_TYPE_VECTOR" value="1" enum="OpType">
A vector type.
</constant>
- <constant name="TYPE_MAX" value="2" enum="Type">
- Represents the size of the [enum Type] enum.
+ <constant name="OP_TYPE_MAX" value="2" enum="OpType">
+ Represents the size of the [enum OpType] enum.
</constant>
</constants>
</class>
diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml
index f9f0241365..c1cf639ec0 100644
--- a/doc/classes/WorldEnvironment.xml
+++ b/doc/classes/WorldEnvironment.xml
@@ -10,6 +10,9 @@
</description>
<tutorials>
<link title="Environment and post-processing">https://docs.godotengine.org/en/latest/tutorials/3d/environment_and_post_processing.html</link>
+ <link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/123</link>
+ <link title="2D HDR Demo">https://godotengine.org/asset-library/asset/110</link>
+ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
</methods>
diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml
index 869fc14d40..ce4d000a9b 100644
--- a/doc/classes/bool.xml
+++ b/doc/classes/bool.xml
@@ -6,36 +6,87 @@
<description>
Boolean is a built-in type. There are two boolean values: [code]true[/code] and [code]false[/code]. You can think of it as an switch with on or off (1 or 0) setting. Booleans are used in programming for logic in condition statements, like [code]if[/code] statements.
Booleans can be directly used in [code]if[/code] statements. The code below demonstrates this on the [code]if can_shoot:[/code] line. You don't need to use [code]== true[/code], you only need [code]if can_shoot:[/code]. Similarly, use [code]if not can_shoot:[/code] rather than [code]== false[/code].
- [codeblock]
- var can_shoot = true
+ [codeblocks]
+ [gdscript]
+ var _can_shoot = true
func shoot():
- if can_shoot:
+ if _can_shoot:
pass # Perform shooting actions here.
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ private bool _canShoot = true;
+
+ public void Shoot()
+ {
+ if (_canShoot)
+ {
+ // Perform shooting actions here.
+ }
+ }
+ [/csharp]
+ [/codeblocks]
The following code will only create a bullet if both conditions are met: action "shoot" is pressed and if [code]can_shoot[/code] is [code]true[/code].
[b]Note:[/b] [code]Input.is_action_pressed("shoot")[/code] is also a boolean that is [code]true[/code] when "shoot" is pressed and [code]false[/code] when "shoot" isn't pressed.
- [codeblock]
- var can_shoot = true
+ [codeblocks]
+ [gdscript]
+ var _can_shoot = true
func shoot():
- if can_shoot and Input.is_action_pressed("shoot"):
+ if _can_shoot and Input.is_action_pressed("shoot"):
create_bullet()
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ private bool _canShoot = true;
+
+ public void Shoot()
+ {
+ if (_canShoot &amp;&amp; Input.IsActionPressed("shoot"))
+ {
+ CreateBullet();
+ }
+ }
+ [/csharp]
+ [/codeblocks]
The following code will set [code]can_shoot[/code] to [code]false[/code] and start a timer. This will prevent player from shooting until the timer runs out. Next [code]can_shoot[/code] will be set to [code]true[/code] again allowing player to shoot once again.
- [codeblock]
- var can_shoot = true
- onready var cool_down = $CoolDownTimer
+ [gdscript]
+ var _can_shoot = true
+ onready var _cool_down = $CoolDownTimer
func shoot():
- if can_shoot and Input.is_action_pressed("shoot"):
+ if _can_shoot and Input.is_action_pressed("shoot"):
create_bullet()
- can_shoot = false
- cool_down.start()
+ _can_shoot = false
+ _cool_down.start()
func _on_CoolDownTimer_timeout():
- can_shoot = true
- [/codeblock]
+ _can_shoot = true
+ [/gdscript]
+ [csharp]
+ private bool _canShoot = true;
+ private Timer _coolDown;
+
+ public override void _Ready()
+ {
+ _coolDown = GetNode&lt;Timer&gt;("CoolDownTimer");
+ }
+
+ public void Shoot()
+ {
+ if (_canShoot &amp;&amp; Input.IsActionPressed("shoot"))
+ {
+ CreateBullet();
+ _canShoot = false;
+ _coolDown.Start();
+ }
+ }
+
+ public void OnCoolDownTimerTimeout()
+ {
+ _canShoot = true;
+ }
+ [/csharp]
+ [/codeblocks]
</description>
<tutorials>
</tutorials>
diff --git a/doc/translations/ar.po b/doc/translations/ar.po
index eae5d09b38..1857e45627 100644
--- a/doc/translations/ar.po
+++ b/doc/translations/ar.po
@@ -11069,7 +11069,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14163,7 +14163,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -32615,7 +32615,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/ca.po b/doc/translations/ca.po
index caa43cfa3a..2e5c7e2c84 100644
--- a/doc/translations/ca.po
+++ b/doc/translations/ca.po
@@ -11100,7 +11100,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14194,7 +14194,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -32646,7 +32646,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/classes.pot b/doc/translations/classes.pot
index 7f352bce28..41c20b05ea 100644
--- a/doc/translations/classes.pot
+++ b/doc/translations/classes.pot
@@ -11070,7 +11070,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14164,7 +14164,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -32616,7 +32616,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/cs.po b/doc/translations/cs.po
index 8f8cb7da91..8d94351710 100644
--- a/doc/translations/cs.po
+++ b/doc/translations/cs.po
@@ -11562,7 +11562,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14656,7 +14656,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -33115,7 +33115,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/de.po b/doc/translations/de.po
index 740d4eed12..95b73f8257 100644
--- a/doc/translations/de.po
+++ b/doc/translations/de.po
@@ -11385,7 +11385,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14492,7 +14492,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -33032,7 +33032,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/es.po b/doc/translations/es.po
index 4d71c12010..ef6012b240 100644
--- a/doc/translations/es.po
+++ b/doc/translations/es.po
@@ -14573,10 +14573,10 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
"Devuelve [code]true[/code] si el nodo está configurado como de nivel "
-"superior. Ver [method set_as_toplevel]."
+"superior. Ver [method set_as_top_level]."
#: doc/classes/CanvasItem.xml:530
msgid ""
@@ -18642,7 +18642,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -44207,10 +44207,10 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
-"Devuelve si este nodo se establece como Toplevel, es decir, si ignora las "
+"Devuelve si este nodo se establece como top_level, es decir, si ignora las "
"transformaciones de sus nodos padres."
#: doc/classes/Node3D.xml:97
diff --git a/doc/translations/fa.po b/doc/translations/fa.po
index 874d3273c3..06d6ee47d7 100644
--- a/doc/translations/fa.po
+++ b/doc/translations/fa.po
@@ -11075,7 +11075,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14169,7 +14169,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -32621,7 +32621,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/fi.po b/doc/translations/fi.po
index 3163a6131f..02ac9fdd76 100644
--- a/doc/translations/fi.po
+++ b/doc/translations/fi.po
@@ -11088,7 +11088,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14182,7 +14182,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -32634,7 +32634,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/fr.po b/doc/translations/fr.po
index 55434729e5..a8075d919d 100644
--- a/doc/translations/fr.po
+++ b/doc/translations/fr.po
@@ -11406,7 +11406,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14500,7 +14500,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -32982,7 +32982,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/id.po b/doc/translations/id.po
index 246cf15495..b686ef8de6 100644
--- a/doc/translations/id.po
+++ b/doc/translations/id.po
@@ -11101,7 +11101,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14195,7 +14195,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -32647,7 +32647,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/it.po b/doc/translations/it.po
index 8a8ec5d107..f664268ebe 100644
--- a/doc/translations/it.po
+++ b/doc/translations/it.po
@@ -11359,7 +11359,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14453,7 +14453,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -32913,7 +32913,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/ja.po b/doc/translations/ja.po
index 02072678ef..9727ca0cd3 100644
--- a/doc/translations/ja.po
+++ b/doc/translations/ja.po
@@ -12289,7 +12289,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -15383,7 +15383,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -33885,7 +33885,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/ko.po b/doc/translations/ko.po
index ddc892b659..f69b5f00c0 100644
--- a/doc/translations/ko.po
+++ b/doc/translations/ko.po
@@ -11077,7 +11077,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14171,7 +14171,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -32623,7 +32623,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/nl.po b/doc/translations/nl.po
index 4f840c229c..17bd3db383 100644
--- a/doc/translations/nl.po
+++ b/doc/translations/nl.po
@@ -11103,7 +11103,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14197,7 +14197,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -32649,7 +32649,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/pl.po b/doc/translations/pl.po
index b3817aa5f6..fd494dc656 100644
--- a/doc/translations/pl.po
+++ b/doc/translations/pl.po
@@ -11121,7 +11121,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14215,7 +14215,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -32668,7 +32668,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/pt_BR.po b/doc/translations/pt_BR.po
index 89460c5caf..2e8337989f 100644
--- a/doc/translations/pt_BR.po
+++ b/doc/translations/pt_BR.po
@@ -11116,7 +11116,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14210,7 +14210,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -32662,7 +32662,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/ro.po b/doc/translations/ro.po
index fb47ddb0dc..f7e5e0f86f 100644
--- a/doc/translations/ro.po
+++ b/doc/translations/ro.po
@@ -11077,7 +11077,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14171,7 +14171,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -32623,7 +32623,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/ru.po b/doc/translations/ru.po
index 83c3440a64..6a397ec35d 100644
--- a/doc/translations/ru.po
+++ b/doc/translations/ru.po
@@ -11582,7 +11582,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14676,7 +14676,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -33160,7 +33160,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/sr_Cyrl.po b/doc/translations/sr_Cyrl.po
index 6d0bd44ba7..156fbabfc0 100644
--- a/doc/translations/sr_Cyrl.po
+++ b/doc/translations/sr_Cyrl.po
@@ -11087,7 +11087,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14181,7 +14181,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -32633,7 +32633,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/th.po b/doc/translations/th.po
index 5753295ef4..cbcbc51f63 100644
--- a/doc/translations/th.po
+++ b/doc/translations/th.po
@@ -11093,7 +11093,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14187,7 +14187,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -32639,7 +32639,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/tr.po b/doc/translations/tr.po
index 0e5992ad0e..33208243f8 100644
--- a/doc/translations/tr.po
+++ b/doc/translations/tr.po
@@ -11069,7 +11069,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14163,7 +14163,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -32615,7 +32615,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/uk.po b/doc/translations/uk.po
index e94a78591f..45da6d19aa 100644
--- a/doc/translations/uk.po
+++ b/doc/translations/uk.po
@@ -11155,7 +11155,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14249,7 +14249,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -32701,7 +32701,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/zh_Hans.po b/doc/translations/zh_Hans.po
index 08e9667c29..2e9d14c0d8 100644
--- a/doc/translations/zh_Hans.po
+++ b/doc/translations/zh_Hans.po
@@ -11302,7 +11302,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14396,7 +14396,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -32851,7 +32851,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""
diff --git a/doc/translations/zh_Hant.po b/doc/translations/zh_Hant.po
index e09b693f6e..9483576d0e 100644
--- a/doc/translations/zh_Hant.po
+++ b/doc/translations/zh_Hant.po
@@ -11106,7 +11106,7 @@ msgstr ""
#: doc/classes/CanvasItem.xml:523
msgid ""
"Returns [code]true[/code] if the node is set as top-level. See [method "
-"set_as_toplevel]."
+"set_as_top_level]."
msgstr ""
#: doc/classes/CanvasItem.xml:530
@@ -14200,7 +14200,7 @@ msgstr ""
#: doc/classes/Control.xml:545
msgid ""
-"Invalidates the size cache in this node and in parent nodes up to toplevel. "
+"Invalidates the size cache in this node and in parent nodes up to top_level. "
"Intended to be used with [method get_minimum_size] when the return value is "
"changed. Setting [member rect_min_size] directly calls this method "
"automatically."
@@ -32652,7 +32652,7 @@ msgstr ""
#: doc/classes/Node3D.xml:90
msgid ""
-"Returns whether this node is set as Toplevel, that is whether it ignores its "
+"Returns whether this node is set as top_level, that is whether it ignores its "
"parent nodes transformations."
msgstr ""