summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GlobalScope.xml6
-rw-r--r--doc/classes/AudioStreamRandomizer.xml6
-rw-r--r--doc/classes/BackBufferCopy.xml12
-rw-r--r--doc/classes/CollisionObject2D.xml4
-rw-r--r--doc/classes/CollisionObject3D.xml4
-rw-r--r--doc/classes/Control.xml3
-rw-r--r--doc/classes/EditorPaths.xml2
-rw-r--r--doc/classes/EditorScenePostImport.xml6
-rw-r--r--doc/classes/GDExtension.xml (renamed from doc/classes/NativeExtension.xml)6
-rw-r--r--doc/classes/GDExtensionManager.xml (renamed from doc/classes/NativeExtensionManager.xml)10
-rw-r--r--doc/classes/NavigationServer2D.xml30
-rw-r--r--doc/classes/NavigationServer3D.xml30
-rw-r--r--doc/classes/PhysicsPointQueryParameters2D.xml2
-rw-r--r--doc/classes/PopupMenu.xml2
-rw-r--r--doc/classes/RenderingDevice.xml16
-rw-r--r--doc/classes/RenderingServer.xml6
-rw-r--r--doc/classes/SceneTree.xml1
-rw-r--r--doc/classes/String.xml18
-rw-r--r--doc/classes/StringName.xml909
-rw-r--r--doc/classes/TextServer.xml2
-rw-r--r--doc/classes/TileSet.xml1
-rw-r--r--doc/classes/Tree.xml2
-rw-r--r--doc/classes/TreeItem.xml4
-rw-r--r--doc/classes/Vector2.xml2
-rw-r--r--doc/classes/Vector3.xml2
-rw-r--r--doc/classes/Vector4.xml2
-rw-r--r--doc/classes/Window.xml210
-rw-r--r--doc/classes/XRInterfaceExtension.xml2
-rw-r--r--doc/classes/float.xml2
29 files changed, 1220 insertions, 82 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index 4a6b85f229..50c1ed847a 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -1319,6 +1319,9 @@
<member name="EngineDebugger" type="EngineDebugger" setter="" getter="">
The [EngineDebugger] singleton.
</member>
+ <member name="GDExtensionManager" type="GDExtensionManager" setter="" getter="">
+ The [GDExtensionManager] singleton.
+ </member>
<member name="Geometry2D" type="Geometry2D" setter="" getter="">
The [Geometry2D] singleton.
</member>
@@ -1348,9 +1351,6 @@
<member name="Marshalls" type="Marshalls" setter="" getter="">
The [Marshalls] singleton.
</member>
- <member name="NativeExtensionManager" type="NativeExtensionManager" setter="" getter="">
- The [NativeExtensionManager] singleton.
- </member>
<member name="NavigationMeshGenerator" type="NavigationMeshGenerator" setter="" getter="">
The [NavigationMeshGenerator] singleton.
</member>
diff --git a/doc/classes/AudioStreamRandomizer.xml b/doc/classes/AudioStreamRandomizer.xml
index 5490770b7d..9b58d78af5 100644
--- a/doc/classes/AudioStreamRandomizer.xml
+++ b/doc/classes/AudioStreamRandomizer.xml
@@ -78,13 +78,13 @@
</members>
<constants>
<constant name="PLAYBACK_RANDOM_NO_REPEATS" value="0" enum="PlaybackMode">
- Pick a stream at random according to the probability weights chosen for each stream, but avoid playing the same stream twice in a row whenever possible.
+ Pick a stream at random according to the probability weights chosen for each stream, but avoid playing the same stream twice in a row whenever possible. If only 1 sound is present in the pool, the same sound will always play, effectively allowing repeats to occur.
</constant>
<constant name="PLAYBACK_RANDOM" value="1" enum="PlaybackMode">
- Pick a stream at random according to the probability weights chosen for each stream.
+ Pick a stream at random according to the probability weights chosen for each stream. If only 1 sound is present in the pool, the same sound will always play.
</constant>
<constant name="PLAYBACK_SEQUENTIAL" value="2" enum="PlaybackMode">
- Play streams in the order they appear in the stream pool.
+ Play streams in the order they appear in the stream pool. If only 1 sound is present in the pool, the same sound will always play.
</constant>
</constants>
</class>
diff --git a/doc/classes/BackBufferCopy.xml b/doc/classes/BackBufferCopy.xml
index 3c811e6226..b2c5a1756f 100644
--- a/doc/classes/BackBufferCopy.xml
+++ b/doc/classes/BackBufferCopy.xml
@@ -4,8 +4,8 @@
Copies a region of the screen (or the whole screen) to a buffer so it can be accessed in your shader scripts through the [code]texture(SCREEN_TEXTURE, ...)[/code] function.
</brief_description>
<description>
- Node for back-buffering the currently-displayed screen. The region defined in the BackBufferCopy node is buffered with the content of the screen it covers, or the entire screen according to the copy mode set. Use the [code]texture(SCREEN_TEXTURE, ...)[/code] function in your shader scripts to access the buffer.
- [b]Note:[/b] Since this node inherits from [Node2D] (and not [Control]), anchors and margins won't apply to child [Control]-derived nodes. This can be problematic when resizing the window. To avoid this, add [Control]-derived nodes as [i]siblings[/i] to the BackBufferCopy node instead of adding them as children.
+ Node for back-buffering the currently-displayed screen. The region defined in the [BackBufferCopy] node is buffered with the content of the screen it covers, or the entire screen according to the copy mode set. Use the [code]texture(SCREEN_TEXTURE, ...)[/code] function in your shader scripts to access the buffer.
+ [b]Note:[/b] Since this node inherits from [Node2D] (and not [Control]), anchors and margins won't apply to child [Control]-derived nodes. This can be problematic when resizing the window. To avoid this, add [Control]-derived nodes as [i]siblings[/i] to the [BackBufferCopy] node instead of adding them as children.
</description>
<tutorials>
</tutorials>
@@ -14,18 +14,18 @@
Buffer mode. See [enum CopyMode] constants.
</member>
<member name="rect" type="Rect2" setter="set_rect" getter="get_rect" default="Rect2(-100, -100, 200, 200)">
- The area covered by the BackBufferCopy. Only used if [member copy_mode] is [constant COPY_MODE_RECT].
+ The area covered by the [BackBufferCopy]. Only used if [member copy_mode] is [constant COPY_MODE_RECT].
</member>
</members>
<constants>
<constant name="COPY_MODE_DISABLED" value="0" enum="CopyMode">
- Disables the buffering mode. This means the BackBufferCopy node will directly use the portion of screen it covers.
+ Disables the buffering mode. This means the [BackBufferCopy] node will directly use the portion of screen it covers.
</constant>
<constant name="COPY_MODE_RECT" value="1" enum="CopyMode">
- BackBufferCopy buffers a rectangular region.
+ [BackBufferCopy] buffers a rectangular region.
</constant>
<constant name="COPY_MODE_VIEWPORT" value="2" enum="CopyMode">
- BackBufferCopy buffers the entire screen.
+ [BackBufferCopy] buffers the entire screen.
</constant>
</constants>
</class>
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml
index ee69015ae1..3ed2c9d3de 100644
--- a/doc/classes/CollisionObject2D.xml
+++ b/doc/classes/CollisionObject2D.xml
@@ -157,7 +157,7 @@
<param index="0" name="owner_id" type="int" />
<param index="1" name="shape_id" type="int" />
<description>
- Returns the [Shape2D] with the given id from the given shape owner.
+ Returns the [Shape2D] with the given ID from the given shape owner.
</description>
</method>
<method name="shape_owner_get_shape_count" qualifiers="const">
@@ -172,7 +172,7 @@
<param index="0" name="owner_id" type="int" />
<param index="1" name="shape_id" type="int" />
<description>
- Returns the child index of the [Shape2D] with the given id from the given shape owner.
+ Returns the child index of the [Shape2D] with the given ID from the given shape owner.
</description>
</method>
<method name="shape_owner_get_transform" qualifiers="const">
diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml
index f10136521a..c302963b92 100644
--- a/doc/classes/CollisionObject3D.xml
+++ b/doc/classes/CollisionObject3D.xml
@@ -130,7 +130,7 @@
<param index="0" name="owner_id" type="int" />
<param index="1" name="shape_id" type="int" />
<description>
- Returns the [Shape3D] with the given id from the given shape owner.
+ Returns the [Shape3D] with the given ID from the given shape owner.
</description>
</method>
<method name="shape_owner_get_shape_count" qualifiers="const">
@@ -145,7 +145,7 @@
<param index="0" name="owner_id" type="int" />
<param index="1" name="shape_id" type="int" />
<description>
- Returns the child index of the [Shape3D] with the given id from the given shape owner.
+ Returns the child index of the [Shape3D] with the given ID from the given shape owner.
</description>
</method>
<method name="shape_owner_get_transform" qualifiers="const">
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 8a38deeebe..fd6aab6a49 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -1071,7 +1071,8 @@
Tells the parent [Container] nodes how they should resize and place the node on the Y axis. Use one of the [enum SizeFlags] constants to change the flags. See the constants to learn what each does.
</member>
<member name="theme" type="Theme" setter="set_theme" getter="get_theme">
- The [Theme] resource this node and all its [Control] children use. If a child node has its own [Theme] resource set, theme items are merged with child's definitions having higher priority.
+ The [Theme] resource this node and all its [Control] and [Window] children use. If a child node has its own [Theme] resource set, theme items are merged with child's definitions having higher priority.
+ [b]Note:[/b] [Window] styles will have no effect unless the window is embedded.
</member>
<member name="theme_type_variation" type="StringName" setter="set_theme_type_variation" getter="get_theme_type_variation" default="&amp;&quot;&quot;">
The name of a theme type variation used by this [Control] to look up its own theme items. When empty, the class name of the node is used (e.g. [code]Button[/code] for the [Button] control), as well as the class names of all parent classes (in order of inheritance).
diff --git a/doc/classes/EditorPaths.xml b/doc/classes/EditorPaths.xml
index 2975ea6d75..929cf767a6 100644
--- a/doc/classes/EditorPaths.xml
+++ b/doc/classes/EditorPaths.xml
@@ -6,7 +6,7 @@
<description>
This editor-only singleton returns OS-specific paths to various data folders and files. It can be used in editor plugins to ensure files are saved in the correct location on each operating system.
[b]Note:[/b] This singleton is not accessible in exported projects. Attempting to access it in an exported project will result in a script error as the singleton won't be declared. To prevent script errors in exported projects, use [method Engine.has_singleton] to check whether the singleton is available before using it.
- [b]Note:[/b] Godot complies with the [url=https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html]XDG Base Directory Specification[/url] on [i]all[/i] platforms. You can override environment variables following the specification to change the editor and project data paths.
+ [b]Note:[/b] On the Linux/BSD platform, Godot complies with the [url=https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html]XDG Base Directory Specification[/url]. You can override environment variables following the specification to change the editor and project data paths.
</description>
<tutorials>
<link title="File paths in Godot projects">https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html</link>
diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml
index 2bf2accf17..d2ad8d1bed 100644
--- a/doc/classes/EditorScenePostImport.xml
+++ b/doc/classes/EditorScenePostImport.xml
@@ -28,12 +28,12 @@
// This sample changes all node names.
// Called right after the scene is imported and gets the root node.
[Tool]
- public class NodeRenamer : EditorScenePostImport
+ public partial class NodeRenamer : EditorScenePostImport
{
- public override Object PostImport(Object scene)
+ public override Object _PostImport(Node scene)
{
// Change all node names to "modified_[oldnodename]"
- Iterate(scene as Node);
+ Iterate(scene);
return scene; // Remember to return the imported scene
}
public void Iterate(Node node)
diff --git a/doc/classes/NativeExtension.xml b/doc/classes/GDExtension.xml
index 50f976ca6f..9791290bd9 100644
--- a/doc/classes/NativeExtension.xml
+++ b/doc/classes/GDExtension.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NativeExtension" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="GDExtension" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
@@ -13,13 +13,13 @@
</description>
</method>
<method name="get_minimum_library_initialization_level" qualifiers="const">
- <return type="int" enum="NativeExtension.InitializationLevel" />
+ <return type="int" enum="GDExtension.InitializationLevel" />
<description>
</description>
</method>
<method name="initialize_library">
<return type="void" />
- <param index="0" name="level" type="int" enum="NativeExtension.InitializationLevel" />
+ <param index="0" name="level" type="int" enum="GDExtension.InitializationLevel" />
<description>
</description>
</method>
diff --git a/doc/classes/NativeExtensionManager.xml b/doc/classes/GDExtensionManager.xml
index 7d6eefa94f..f682d800c6 100644
--- a/doc/classes/NativeExtensionManager.xml
+++ b/doc/classes/GDExtensionManager.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NativeExtensionManager" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="GDExtensionManager" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
</brief_description>
<description>
@@ -8,7 +8,7 @@
</tutorials>
<methods>
<method name="get_extension">
- <return type="NativeExtension" />
+ <return type="GDExtension" />
<param index="0" name="path" type="String" />
<description>
</description>
@@ -25,19 +25,19 @@
</description>
</method>
<method name="load_extension">
- <return type="int" enum="NativeExtensionManager.LoadStatus" />
+ <return type="int" enum="GDExtensionManager.LoadStatus" />
<param index="0" name="path" type="String" />
<description>
</description>
</method>
<method name="reload_extension">
- <return type="int" enum="NativeExtensionManager.LoadStatus" />
+ <return type="int" enum="GDExtensionManager.LoadStatus" />
<param index="0" name="path" type="String" />
<description>
</description>
</method>
<method name="unload_extension">
- <return type="int" enum="NativeExtensionManager.LoadStatus" />
+ <return type="int" enum="GDExtensionManager.LoadStatus" />
<param index="0" name="path" type="String" />
<description>
</description>
diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml
index 981ab8a5e1..ab59add092 100644
--- a/doc/classes/NavigationServer2D.xml
+++ b/doc/classes/NavigationServer2D.xml
@@ -167,6 +167,13 @@
Returns the navigation layers for this [code]link[/code].
</description>
</method>
+ <method name="link_get_owner_id" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="link" type="RID" />
+ <description>
+ Returns the [code]ObjectID[/code] of the object which manages this link.
+ </description>
+ </method>
<method name="link_get_start_location" qualifiers="const">
<return type="Vector2" />
<param index="0" name="link" type="RID" />
@@ -228,6 +235,14 @@
Set the links's navigation layers. This allows selecting links from a path request (when using [method NavigationServer2D.map_get_path]).
</description>
</method>
+ <method name="link_set_owner_id" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="link" type="RID" />
+ <param index="1" name="owner_id" type="int" />
+ <description>
+ Set the [code]ObjectID[/code] of the object which manages this link.
+ </description>
+ </method>
<method name="link_set_start_location" qualifiers="const">
<return type="void" />
<param index="0" name="link" type="RID" />
@@ -426,6 +441,13 @@
Returns the region's navigation layers.
</description>
</method>
+ <method name="region_get_owner_id" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="region" type="RID" />
+ <description>
+ Returns the [code]ObjectID[/code] of the object which manages this region.
+ </description>
+ </method>
<method name="region_get_travel_cost" qualifiers="const">
<return type="float" />
<param index="0" name="region" type="RID" />
@@ -475,6 +497,14 @@
Sets the navigation mesh for the region.
</description>
</method>
+ <method name="region_set_owner_id" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="region" type="RID" />
+ <param index="1" name="owner_id" type="int" />
+ <description>
+ Set the [code]ObjectID[/code] of the object which manages this region.
+ </description>
+ </method>
<method name="region_set_transform" qualifiers="const">
<return type="void" />
<param index="0" name="region" type="RID" />
diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml
index 943aa03ef7..27a07eda90 100644
--- a/doc/classes/NavigationServer3D.xml
+++ b/doc/classes/NavigationServer3D.xml
@@ -167,6 +167,13 @@
Returns the navigation layers for this [code]link[/code].
</description>
</method>
+ <method name="link_get_owner_id" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="link" type="RID" />
+ <description>
+ Returns the [code]ObjectID[/code] of the object which manages this link.
+ </description>
+ </method>
<method name="link_get_start_location" qualifiers="const">
<return type="Vector3" />
<param index="0" name="link" type="RID" />
@@ -228,6 +235,14 @@
Set the links's navigation layers. This allows selecting links from a path request (when using [method NavigationServer3D.map_get_path]).
</description>
</method>
+ <method name="link_set_owner_id" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="link" type="RID" />
+ <param index="1" name="owner_id" type="int" />
+ <description>
+ Set the [code]ObjectID[/code] of the object which manages this link.
+ </description>
+ </method>
<method name="link_set_start_location" qualifiers="const">
<return type="void" />
<param index="0" name="link" type="RID" />
@@ -476,6 +491,13 @@
Returns the region's navigation layers.
</description>
</method>
+ <method name="region_get_owner_id" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="region" type="RID" />
+ <description>
+ Returns the [code]ObjectID[/code] of the object which manages this region.
+ </description>
+ </method>
<method name="region_get_travel_cost" qualifiers="const">
<return type="float" />
<param index="0" name="region" type="RID" />
@@ -525,6 +547,14 @@
Sets the navigation mesh for the region.
</description>
</method>
+ <method name="region_set_owner_id" qualifiers="const">
+ <return type="void" />
+ <param index="0" name="region" type="RID" />
+ <param index="1" name="owner_id" type="int" />
+ <description>
+ Set the [code]ObjectID[/code] of the object which manages this region.
+ </description>
+ </method>
<method name="region_set_transform" qualifiers="const">
<return type="void" />
<param index="0" name="region" type="RID" />
diff --git a/doc/classes/PhysicsPointQueryParameters2D.xml b/doc/classes/PhysicsPointQueryParameters2D.xml
index e49d2a9f5f..76dc816dab 100644
--- a/doc/classes/PhysicsPointQueryParameters2D.xml
+++ b/doc/classes/PhysicsPointQueryParameters2D.xml
@@ -10,7 +10,7 @@
</tutorials>
<members>
<member name="canvas_instance_id" type="int" setter="set_canvas_instance_id" getter="get_canvas_instance_id" default="0">
- If different from [code]0[/code], restricts the query to a specific canvas layer specified by its instance id. See [method Object.get_instance_id].
+ If different from [code]0[/code], restricts the query to a specific canvas layer specified by its instance ID. See [method Object.get_instance_id].
</member>
<member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false">
If [code]true[/code], the query will take [Area2D]s into account.
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index a69163f429..6810b0e8e4 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -206,7 +206,7 @@
<return type="int" />
<param index="0" name="index" type="int" />
<description>
- Returns the id of the item at the given [param index]. [code]id[/code] can be manually assigned, while index can not.
+ Returns the ID of the item at the given [param index]. [code]id[/code] can be manually assigned, while index can not.
</description>
</method>
<method name="get_item_indent" qualifiers="const">
diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml
index 8afe6eb935..797231ac5e 100644
--- a/doc/classes/RenderingDevice.xml
+++ b/doc/classes/RenderingDevice.xml
@@ -425,7 +425,7 @@
<param index="5" name="multisample_state" type="RDPipelineMultisampleState" />
<param index="6" name="stencil_state" type="RDPipelineDepthStencilState" />
<param index="7" name="color_blend_state" type="RDPipelineColorBlendState" />
- <param index="8" name="dynamic_state_flags" type="int" default="0" />
+ <param index="8" name="dynamic_state_flags" type="int" enum="RenderingDevice.PipelineDynamicStateFlags" default="0" />
<param index="9" name="for_render_pass" type="int" default="0" />
<param index="10" name="specialization_constants" type="RDPipelineSpecializationConstant[]" default="[]" />
<description>
@@ -1453,19 +1453,19 @@
</constant>
<constant name="BLEND_OP_MAX" value="5" enum="BlendOperation">
</constant>
- <constant name="DYNAMIC_STATE_LINE_WIDTH" value="1" enum="PipelineDynamicStateFlags">
+ <constant name="DYNAMIC_STATE_LINE_WIDTH" value="1" enum="PipelineDynamicStateFlags" is_bitfield="true">
</constant>
- <constant name="DYNAMIC_STATE_DEPTH_BIAS" value="2" enum="PipelineDynamicStateFlags">
+ <constant name="DYNAMIC_STATE_DEPTH_BIAS" value="2" enum="PipelineDynamicStateFlags" is_bitfield="true">
</constant>
- <constant name="DYNAMIC_STATE_BLEND_CONSTANTS" value="4" enum="PipelineDynamicStateFlags">
+ <constant name="DYNAMIC_STATE_BLEND_CONSTANTS" value="4" enum="PipelineDynamicStateFlags" is_bitfield="true">
</constant>
- <constant name="DYNAMIC_STATE_DEPTH_BOUNDS" value="8" enum="PipelineDynamicStateFlags">
+ <constant name="DYNAMIC_STATE_DEPTH_BOUNDS" value="8" enum="PipelineDynamicStateFlags" is_bitfield="true">
</constant>
- <constant name="DYNAMIC_STATE_STENCIL_COMPARE_MASK" value="16" enum="PipelineDynamicStateFlags">
+ <constant name="DYNAMIC_STATE_STENCIL_COMPARE_MASK" value="16" enum="PipelineDynamicStateFlags" is_bitfield="true">
</constant>
- <constant name="DYNAMIC_STATE_STENCIL_WRITE_MASK" value="32" enum="PipelineDynamicStateFlags">
+ <constant name="DYNAMIC_STATE_STENCIL_WRITE_MASK" value="32" enum="PipelineDynamicStateFlags" is_bitfield="true">
</constant>
- <constant name="DYNAMIC_STATE_STENCIL_REFERENCE" value="64" enum="PipelineDynamicStateFlags">
+ <constant name="DYNAMIC_STATE_STENCIL_REFERENCE" value="64" enum="PipelineDynamicStateFlags" is_bitfield="true">
</constant>
<constant name="INITIAL_ACTION_CLEAR" value="0" enum="InitialAction">
</constant>
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 2ffa4dc50b..fc05f67416 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -1295,13 +1295,13 @@
<method name="get_test_cube">
<return type="RID" />
<description>
- Returns the id of the test cube. Creates one if none exists.
+ Returns the ID of the test cube. Creates one if none exists.
</description>
</method>
<method name="get_test_texture">
<return type="RID" />
<description>
- Returns the id of the test texture. Creates one if none exists.
+ Returns the ID of the test texture. Creates one if none exists.
</description>
</method>
<method name="get_video_adapter_api_version" qualifiers="const">
@@ -1335,7 +1335,7 @@
<method name="get_white_texture">
<return type="RID" />
<description>
- Returns the id of a white texture. Creates one if none exists.
+ Returns the ID of a white texture. Creates one if none exists.
</description>
</method>
<method name="gi_set_use_half_resolution">
diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml
index 070b98f21d..bd5b656e1a 100644
--- a/doc/classes/SceneTree.xml
+++ b/doc/classes/SceneTree.xml
@@ -308,6 +308,7 @@
</constant>
<constant name="GROUP_CALL_UNIQUE" value="4" enum="GroupCallFlags">
Call a group only once even if the call is executed many times.
+ [b]Note:[/b] Arguments are not taken into account when deciding whether the call is unique or not. Therefore when the same method is called with different arguments, only the first call will be performed.
</constant>
</constants>
</class>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index 7e76a134ff..d5624aeaa2 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -185,16 +185,16 @@
[gdscript]
print("Team".find("I")) # Prints -1
- print("Potato".find("t")) # Prints 2
- print("Potato".find("t", 3)) # Prints 4
- print("Potato".find("t", 5)) # Prints -1
+ print("Potato".find("t")) # Prints 2
+ print("Potato".find("t", 3)) # Prints 4
+ print("Potato".find("t", 5)) # Prints -1
[/gdscript]
[csharp]
GD.Print("Team".Find("I")); // Prints -1
- GD.Print("Potato".Find("t")); // Prints 2
- GD.print("Potato".Find("t", 3)); // Prints 4
- GD.print("Potato".Find("t", 5)); // Prints -1
+ GD.Print("Potato".Find("t")); // Prints 2
+ GD.print("Potato".Find("t", 3)); // Prints 4
+ GD.print("Potato".Find("t", 5)); // Prints -1
[/csharp]
[/codeblocks]
[b]Note:[/b] If you just want to know whether the string contains [param what], use [method contains]. In GDScript, you may also use the [code]in[/code] operator.
@@ -1062,6 +1062,12 @@
Appends [param right] at the end of this [String], also known as a string concatenation.
</description>
</operator>
+ <operator name="operator +">
+ <return type="String" />
+ <param index="0" name="right" type="StringName" />
+ <description>
+ </description>
+ </operator>
<operator name="operator &lt;">
<return type="bool" />
<param index="0" name="right" type="String" />
diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml
index 02e9c62cd6..e3cb6517f3 100644
--- a/doc/classes/StringName.xml
+++ b/doc/classes/StringName.xml
@@ -7,6 +7,8 @@
[StringName]s are immutable strings designed for general-purpose representation of unique names (also called "string interning"). [StringName] ensures that only one instance of a given name exists (so two [StringName]s with the same value are the same object). Comparing them is much faster than with regular [String]s, because only the pointers are compared, not the whole strings.
You will usually just pass a [String] to methods expecting a [StringName] and it will be automatically converted, but you may occasionally want to construct a [StringName] ahead of time with [StringName] or, in GDScript, the literal syntax [code]&amp;"example"[/code].
See also [NodePath], which is a similar concept specifically designed to store pre-parsed node paths.
+ Some string methods have corresponding variations. Variations suffixed with [code]n[/code] ([method countn], [method findn], [method replacen], etc.) are [b]case-insensitive[/b] (they make no distinction between uppercase and lowercase letters). Method variations prefixed with [code]r[/code] ([method rfind], [method rsplit], etc.) are reversed, and start from the end of the string, instead of the beginning.
+ [b]Note:[/b] In a boolean context, a [StringName] will evaluate to [code]false[/code] if it is empty ([code]StringName("")[/code]). Otherwise, a [StringName] will always evaluate to [code]true[/code].
</description>
<tutorials>
</tutorials>
@@ -33,10 +35,897 @@
</constructor>
</constructors>
<methods>
+ <method name="begins_with" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="text" type="String" />
+ <description>
+ Returns [code]true[/code] if the string begins with the given [param text]. See also [method ends_with].
+ </description>
+ </method>
+ <method name="bigrams" qualifiers="const">
+ <return type="PackedStringArray" />
+ <description>
+ Returns an array containing the bigrams (pairs of consecutive characters) of this string.
+ [codeblock]
+ print("Get up!".bigrams()) # Prints ["Ge", "et", "t ", " u", "up", "p!"]
+ [/codeblock]
+ </description>
+ </method>
+ <method name="bin_to_int" qualifiers="const">
+ <return type="int" />
+ <description>
+ Converts the string representing a binary number into an [int]. The string may optionally be prefixed with [code]"0b"[/code], and an additional [code]-[/code] prefix for negative numbers.
+ [codeblocks]
+ [gdscript]
+ print("101".bin_to_int()) # Prints 5
+ print("0b101".bin_to_int()) # Prints 5
+ print("-0b10".bin_to_int()) # Prints -2
+ [/gdscript]
+ [csharp]
+ GD.Print("101".BinToInt()); // Prints 5
+ GD.Print("0b101".BinToInt()); // Prints 5
+ GD.Print("-0b10".BinToInt()); // Prints -2
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
+ <method name="c_escape" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns a copy of the string with special characters escaped using the C language standard.
+ </description>
+ </method>
+ <method name="c_unescape" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns a copy of the string with escaped characters replaced by their meanings. Supported escape sequences are [code]\'[/code], [code]\"[/code], [code]\\[/code], [code]\a[/code], [code]\b[/code], [code]\f[/code], [code]\n[/code], [code]\r[/code], [code]\t[/code], [code]\v[/code].
+ [b]Note:[/b] Unlike the GDScript parser, this method doesn't support the [code]\uXXXX[/code] escape sequence.
+ </description>
+ </method>
+ <method name="capitalize" qualifiers="const">
+ <return type="String" />
+ <description>
+ Changes the appearance of the string: replaces underscores ([code]_[/code]) with spaces, adds spaces before uppercase letters in the middle of a word, converts all letters to lowercase, then converts the first one and each one following a space to uppercase.
+ [codeblocks]
+ [gdscript]
+ "move_local_x".capitalize() # Returns "Move Local X"
+ "sceneFile_path".capitalize() # Returns "Scene File Path"
+ [/gdscript]
+ [csharp]
+ "move_local_x".Capitalize(); // Returns "Move Local X"
+ "sceneFile_path".Capitalize(); // Returns "Scene File Path"
+ [/csharp]
+ [/codeblocks]
+ [b]Note:[/b] This method not the same as the default appearance of properties in the Inspector dock, as it does not capitalize acronyms ([code]"2D"[/code], [code]"FPS"[/code], [code]"PNG"[/code], etc.) as you may expect.
+ </description>
+ </method>
+ <method name="casecmp_to" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="to" type="String" />
+ <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. "Less than" and "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order.
+ With different string lengths, returns [code]1[/code] if this string is longer than the [param to] string, or [code]-1[/code] if shorter. Note that the length of empty strings is [i]always[/i] [code]0[/code].
+ To get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method nocasecmp_to] and [method naturalnocasecmp_to].
+ </description>
+ </method>
+ <method name="contains" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="what" type="String" />
+ <description>
+ Returns [code]true[/code] if the string contains [param what]. In GDScript, this corresponds to the [code]in[/code] operator.
+ [codeblocks]
+ [gdscript]
+ print("Node".contains("de")) # Prints true
+ print("team".contains("I")) # Prints false
+ print("I" in "team") # Prints false
+ [/gdscript]
+ [csharp]
+ GD.Print("Node".Contains("de")); // Prints true
+ GD.Print("team".Contains("I")); // Prints false
+ [/csharp]
+ [/codeblocks]
+ If you need to know where [param what] is within the string, use [method find].
+ </description>
+ </method>
+ <method name="count" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="what" type="String" />
+ <param index="1" name="from" type="int" default="0" />
+ <param index="2" name="to" type="int" default="0" />
+ <description>
+ Returns the number of occurrences of the substring [param what] between [param from] and [param to] positions. If [param to] is 0, the search continues until the end of the string.
+ </description>
+ </method>
+ <method name="countn" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="what" type="String" />
+ <param index="1" name="from" type="int" default="0" />
+ <param index="2" name="to" type="int" default="0" />
+ <description>
+ Returns the number of occurrences of the substring [param what] between [param from] and [param to] positions, [b]ignoring case[/b]. If [param to] is 0, the search continues until the end of the string.
+ </description>
+ </method>
+ <method name="dedent" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns a copy of the string with indentation (leading tabs and spaces) removed. See also [method indent] to add indentation.
+ </description>
+ </method>
+ <method name="ends_with" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="text" type="String" />
+ <description>
+ Returns [code]true[/code] if the string ends with the given [param text]. See also [method begins_with].
+ </description>
+ </method>
+ <method name="find" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="what" type="String" />
+ <param index="1" name="from" type="int" default="0" />
+ <description>
+ Returns the index of the [b]first[/b] occurrence of [param what] in this string, or [code]-1[/code] if there are none. The search's start can be specified with [param from], continuing to the end of the string.
+ [codeblocks]
+ [gdscript]
+ print("Team".find("I")) # Prints -1
+
+ print("Potato".find("t")) # Prints 2
+ print("Potato".find("t", 3)) # Prints 4
+ print("Potato".find("t", 5)) # Prints -1
+ [/gdscript]
+ [csharp]
+ GD.Print("Team".Find("I")); // Prints -1
+
+ GD.Print("Potato".Find("t")); // Prints 2
+ GD.print("Potato".Find("t", 3)); // Prints 4
+ GD.print("Potato".Find("t", 5)); // Prints -1
+ [/csharp]
+ [/codeblocks]
+ [b]Note:[/b] If you just want to know whether the string contains [param what], use [method contains]. In GDScript, you may also use the [code]in[/code] operator.
+ </description>
+ </method>
+ <method name="findn" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="what" type="String" />
+ <param index="1" name="from" type="int" default="0" />
+ <description>
+ Returns the index of the [b]first[/b] [b]case-insensitive[/b] occurrence of [param what] in this string, or [code]-1[/code] if there are none. The starting search index can be specified with [param from], continuing to the end of the string.
+ </description>
+ </method>
+ <method name="format" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="values" type="Variant" />
+ <param index="1" name="placeholder" type="String" default="&quot;{_}&quot;" />
+ <description>
+ Formats the string by replacing all occurrences of [param placeholder] with the elements of [param values].
+ [param values] can be a [Dictionary] or an [Array]. Any underscores in [param placeholder] will be replaced with the corresponding keys in advance. Array elements use their index as keys.
+ [codeblock]
+ # Prints "Waiting for Godot is a play by Samuel Beckett, and Godot Engine is named after it."
+ var use_array_values = "Waiting for {0} is a play by {1}, and {0} Engine is named after it."
+ print(use_array_values.format(["Godot", "Samuel Beckett"]))
+
+ # Prints "User 42 is Godot."
+ print("User {id} is {name}.".format({"id": 42, "name": "Godot"}))
+ [/codeblock]
+ Some additional handling is performed when [param values] is an [Array]. If [param placeholder] does not contain an underscore, the elements of the [param values] array will be used to replace one occurrence of the placeholder in order; If an element of [param values] is another 2-element array, it'll be interpreted as a key-value pair.
+ [codeblock]
+ # Prints "User 42 is Godot."
+ print("User {} is {}.".format([42, "Godot"], "{}"))
+ print("User {id} is {name}.".format([["id", 42], ["name", "Godot"]]))
+ [/codeblock]
+ See also the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format string[/url] tutorial.
+ </description>
+ </method>
+ <method name="get_base_dir" qualifiers="const">
+ <return type="String" />
+ <description>
+ If the string is a valid file path, returns the base directory name.
+ [codeblock]
+ var dir_path = "/path/to/file.txt".get_basename() # dir_path is "/path/to"
+ [/codeblock]
+ </description>
+ </method>
+ <method name="get_basename" qualifiers="const">
+ <return type="String" />
+ <description>
+ If the string is a valid file path, returns the full file path, without the extension.
+ [codeblock]
+ var base = "/path/to/file.txt".get_basename() # base is "/path/to/file"
+ [/codeblock]
+ </description>
+ </method>
+ <method name="get_extension" qualifiers="const">
+ <return type="String" />
+ <description>
+ If the string is a valid file name or path, returns the file extension without the leading period ([code].[/code]). Otherwise, returns an empty string.
+ [codeblock]
+ var a = "/path/to/file.txt".get_extension() # a is "txt"
+ var b = "cool.txt".get_extension() # b is "txt"
+ var c = "cool.font.tres".get_extension() # c is "tres"
+ var d = ".pack1".get_extension() # d is "pack1"
+
+ var e = "file.txt.".get_extension() # e is ""
+ var f = "file.txt..".get_extension() # f is ""
+ var g = "txt".get_extension() # g is ""
+ var h = "".get_extension() # h is ""
+ [/codeblock]
+ </description>
+ </method>
+ <method name="get_file" qualifiers="const">
+ <return type="String" />
+ <description>
+ If the string is a valid file path, returns the file name, including the extension.
+ [codeblock]
+ var file = "/path/to/icon.png".get_file() # file is "icon.png"
+ [/codeblock]
+ </description>
+ </method>
+ <method name="get_slice" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="delimiter" type="String" />
+ <param index="1" name="slice" type="int" />
+ <description>
+ Splits the string using a [param delimiter] and returns the substring at index [param slice]. Returns an empty string if the [param slice] does not exist.
+ This is faster than [method split], if you only need one substring.
+ [b]Example:[/b]
+ [codeblock]
+ print("i/am/example/hi".get_slice("/", 2)) # Prints "example"
+ [/codeblock]
+ </description>
+ </method>
+ <method name="get_slice_count" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="delimiter" type="String" />
+ <description>
+ Returns the total number of slices when the string is split with the given [param delimiter] (see [method split]).
+ </description>
+ </method>
+ <method name="get_slicec" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="delimiter" type="int" />
+ <param index="1" name="slice" type="int" />
+ <description>
+ Splits the string using a Unicode character with code [param delimiter] and returns the substring at index [param slice]. Returns an empty string if the [param slice] does not exist.
+ This is faster than [method split], if you only need one substring.
+ </description>
+ </method>
<method name="hash" qualifiers="const">
<return type="int" />
<description>
- Returns the 32-bit hash value representing the [StringName]'s contents.
+ Returns the 32-bit hash value representing the string's contents.
+ [b]Note:[/b] Strings with equal hash values are [i]not[/i] guaranteed to be the same, as a result of hash collisions. On the countrary, strings with different hash values are guaranteed to be different.
+ </description>
+ </method>
+ <method name="hex_to_int" qualifiers="const">
+ <return type="int" />
+ <description>
+ Converts the string representing a hexadecimal number into an [int]. The string may be optionally prefixed with [code]"0x"[/code], and an additional [code]-[/code] prefix for negative numbers.
+ [codeblocks]
+ [gdscript]
+ print("0xff".hex_to_int()) # Prints 255
+ print("ab".hex_to_int()) # Prints 171
+ [/gdscript]
+ [csharp]
+ GD.Print("0xff".HexToInt()); // Prints 255
+ GD.Print("ab".HexToInt()); // Prints 171
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
+ <method name="indent" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="prefix" type="String" />
+ <description>
+ Indents every line of the string with the given [param prefix]. Empty lines are not indented. See also [method dedent] to remove indentation.
+ For example, the string can be indented with two tabulations using [code]"\t\t"[/code], or four spaces using [code]" "[/code].
+ </description>
+ </method>
+ <method name="insert" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="position" type="int" />
+ <param index="1" name="what" type="String" />
+ <description>
+ Inserts [param what] at the given [param position] in the string.
+ </description>
+ </method>
+ <method name="is_absolute_path" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the string is a path to a file or directory, and its starting point is explicitly defined. This method is the opposite of [method is_relative_path].
+ This includes all paths starting with [code]"res://"[/code], [code]"user://"[/code], [code]"C:\"[/code], [code]"/"[/code], etc.
+ </description>
+ </method>
+ <method name="is_empty" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the string's length is [code]0[/code] ([code]""[/code]). See also [method length].
+ </description>
+ </method>
+ <method name="is_relative_path" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the string is a path, and its starting point is dependent on context. The path could begin from the current directory, or the current [Node] (if the string is derived from a [NodePath]), and may sometimes be prefixed with [code]"./"[/code]. This method is the opposite of [method is_absolute_path].
+ </description>
+ </method>
+ <method name="is_subsequence_of" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="text" type="String" />
+ <description>
+ Returns [code]true[/code] if all characters of this string can be found in [param text] in their original order.
+ [codeblock]
+ var text = "Wow, incredible!"
+
+ print("inedible".is_subsequence_of(text)) # Prints true
+ print("Word!".is_subsequence_of(text)) # Prints true
+ print("Window".is_subsequence_of(text)) # Prints false
+ print("".is_subsequence_of(text)) # Prints true
+ [/codeblock]
+ </description>
+ </method>
+ <method name="is_subsequence_ofn" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="text" type="String" />
+ <description>
+ Returns [code]true[/code] if all characters of this string can be found in [param text] in their original order, [b]ignoring case[/b].
+ </description>
+ </method>
+ <method name="is_valid_filename" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this string does not contain characters that are not allowed in file names ([code]:[/code] [code]/[/code] [code]\[/code] [code]?[/code] [code]*[/code] [code]"[/code] [code]|[/code] [code]%[/code] [code]&lt;[/code] [code]&gt;[/code]).
+ </description>
+ </method>
+ <method name="is_valid_float" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this string represents a valid floating-point number. A valid float may contain only digits, one decimal point ([code].[/code]), and the exponent letter ([code]e[/code]). It may also be prefixed with a positive ([code]+[/code]) or negative ([code]-[/code]) sign. Any valid integer is also a valid float (see [method is_valid_int]). See also [method to_float].
+ [codeblock]
+ print("1.7".is_valid_float()) # Prints true
+ print("24".is_valid_float()) # Prints true
+ print("7e3".is_valid_float()) # Prints true
+ print("Hello".is_valid_float()) # Prints false
+ [/codeblock]
+ </description>
+ </method>
+ <method name="is_valid_hex_number" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="with_prefix" type="bool" default="false" />
+ <description>
+ Returns [code]true[/code] if this string is a valid hexadecimal number. A valid hexadecimal number only contains digits or letters [code]A[/code] to [code]F[/code] (either uppercase or lowercase), and may be prefixed with a positive ([code]+[/code]) or negative ([code]-[/code]) sign.
+ If [param with_prefix] is [code]true[/code], the hexadecimal number needs to prefixed by [code]"0x"[/code] to be considered valid.
+ [codeblock]
+ print("A08E".is_valid_hex_number()) # Prints true
+ print("-AbCdEf".is_valid_hex_number()) # Prints true
+ print("2.5".is_valid_hex_number()) # Prints false
+
+ print("0xDEADC0DE".is_valid_hex_number(true)) # Prints true
+ [/codeblock]
+ </description>
+ </method>
+ <method name="is_valid_html_color" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this string is a valid color in hexadecimal HTML notation. The string must be a hexadecimal value (see [method is_valid_hex_number]) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign ([code]#[/code]). Other HTML notations for colors, such as names or [code]hsl()[/code], are not considered valid. See also [method Color.html].
+ </description>
+ </method>
+ <method name="is_valid_identifier" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores ([code]_[/code]), and the first character may not be a digit.
+ [codeblock]
+ print("node_2d".is_valid_identifier()) # Prints true
+ print("TYPE_FLOAT".is_valid_identifier()) # Prints true
+ print("1st_method".is_valid_identifier()) # Prints false
+ print("MyMethod#2".is_valid_identifier()) # Prints false
+ [/codeblock]
+ </description>
+ </method>
+ <method name="is_valid_int" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this string represents a valid integer. A valid integer only contains digits, and may be prefixed with a positive ([code]+[/code]) or negative ([code]-[/code]) sign. See also [method to_int].
+ [codeblock]
+ print("7".is_valid_int()) # Prints true
+ print("1.65".is_valid_int()) # Prints false
+ print("Hi".is_valid_int()) # Prints false
+ print("+3".is_valid_int()) # Prints true
+ print("-12".is_valid_int()) # Prints true
+ [/codeblock]
+ </description>
+ </method>
+ <method name="is_valid_ip_address" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if this string represents 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] and [code]"ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"[/code] as valid.
+ </description>
+ </method>
+ <method name="join" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="parts" type="PackedStringArray" />
+ <description>
+ Returns the concatenation of [param parts]' elements, with each element separated by the string calling this method. This method is the opposite of [method split].
+ [b]Example:[/b]
+ [codeblocks]
+ [gdscript]
+ var fruits = ["Apple", "Orange", "Pear", "Kiwi"]
+
+ print(", ".join(fruits)) # Prints "Apple, Orange, Pear, Kiwi"
+ print("---".join(fruits)) # Prints "Apple---Orange---Pear---Kiwi"
+ [/gdscript]
+ [csharp]
+ var fruits = new string[] {"Apple", "Orange", "Pear", "Kiwi"};
+
+ // In C#, this method is static.
+ GD.Print(string.Join(", ", fruits); // Prints "Apple, Orange, Pear, Kiwi"
+ GD.Print(string.Join("---", fruits)); // Prints "Apple---Orange---Pear---Kiwi"
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
+ <method name="json_escape" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns a copy of the string with special characters escaped using the JSON standard. Because it closely matches the C standard, it is possible to use [method c_unescape] to unescape the string, if necessary.
+ </description>
+ </method>
+ <method name="left" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="length" type="int" />
+ <description>
+ Returns the first [param length] characters from the beginning of the string. If [param length] is negative, strips the last [param length] characters from the string's end.
+ [codeblock]
+ print("Hello World!".left(3)) # Prints "Hel"
+ print("Hello World!".left(-4)) # Prints "Hello Wo"
+ [/codeblock]
+ </description>
+ </method>
+ <method name="length" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the number of characters in the string. Empty strings ([code]""[/code]) always return [code]0[/code]. See also [method is_empty].
+ </description>
+ </method>
+ <method name="lpad" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="min_length" type="int" />
+ <param index="1" name="character" type="String" default="&quot; &quot;" />
+ <description>
+ Formats the string to be at least [param min_length] long by adding [param character]s to the left of the string, if necessary. See also [method rpad].
+ </description>
+ </method>
+ <method name="lstrip" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="chars" type="String" />
+ <description>
+ Removes a set of characters defined in [param chars] from the string's beginning. See also [method rstrip].
+ [b]Note:[/b] [param chars] is not a prefix. Use [method trim_prefix] to remove a single prefix, rather than a set of characters.
+ </description>
+ </method>
+ <method name="match" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="expr" type="String" />
+ <description>
+ Does a simple expression match, where [code]*[/code] matches zero or more arbitrary characters and [code]?[/code] matches any single character except a period ([code].[/code]). An empty string or empty expression always evaluates to [code]false[/code].
+ </description>
+ </method>
+ <method name="matchn" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="expr" type="String" />
+ <description>
+ Does a simple [b]case-insensitive[/b] expression match, where [code]*[/code] matches zero or more arbitrary characters and [code]?[/code] matches any single character except a period ([code].[/code]). An empty string or empty expression always evaluates to [code]false[/code].
+ </description>
+ </method>
+ <method name="md5_buffer" qualifiers="const">
+ <return type="PackedByteArray" />
+ <description>
+ Returns the [url=https://en.wikipedia.org/wiki/MD5]MD5 hash[/url] of the string as a [PackedByteArray].
+ </description>
+ </method>
+ <method name="md5_text" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the [url=https://en.wikipedia.org/wiki/MD5]MD5 hash[/url] of the string as another [String].
+ </description>
+ </method>
+ <method name="naturalnocasecmp_to" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="to" type="String" />
+ <description>
+ Performs a [b]case-insensitive[/b], [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[/url] of each string, which roughly matches the alphabetical order. Internally, lowercase characters are converted to uppercase for the comparison.
+ When used for sorting, natural order comparison orders sequences of numbers by the combined value of each digit as is often expected, instead of the single digit's value. A sorted sequence of numbered strings will be [code]["1", "2", "3", ...][/code], not [code]["1", "10", "2", "3", ...][/code].
+ With different string lengths, returns [code]1[/code] if this string is longer than the [param to] string, or [code]-1[/code] if shorter. Note that the length of empty strings is [i]always[/i] [code]0[/code].
+ To get a [bool] 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" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="to" type="String" />
+ <description>
+ Performs a [b]case-insensitive[/b] 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[/url] of each string, which roughly matches the alphabetical order. Internally, lowercase characters are converted to uppercase for the comparison.
+ With different string lengths, returns [code]1[/code] if this string is longer than the [param to] string, or [code]-1[/code] if shorter. Note that the length of empty strings is [i]always[/i] [code]0[/code].
+ To get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method casecmp_to] and [method naturalnocasecmp_to].
+ </description>
+ </method>
+ <method name="pad_decimals" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="digits" type="int" />
+ <description>
+ Formats the string representing a number to have an exact number of [param digits] [i]after[/i] the decimal point.
+ </description>
+ </method>
+ <method name="pad_zeros" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="digits" type="int" />
+ <description>
+ Formats the string representing a number to have an exact number of [param digits] [i]before[/i] the decimal point.
+ </description>
+ </method>
+ <method name="path_join" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="file" type="String" />
+ <description>
+ Concatenates [param file] at the end of the string as a subpath, adding [code]/[/code] if necessary.
+ [b]Example:[/b] [code]"this/is".path_join("path") == "this/is/path"[/code].
+ </description>
+ </method>
+ <method name="repeat" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="count" type="int" />
+ <description>
+ Repeats this string a number of times. [param count] needs to be greater than [code]0[/code]. Otherwise, returns an empty string.
+ </description>
+ </method>
+ <method name="replace" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="what" type="String" />
+ <param index="1" name="forwhat" type="String" />
+ <description>
+ Replaces all occurrences of [param what] inside the string with the given [param forwhat].
+ </description>
+ </method>
+ <method name="replacen" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="what" type="String" />
+ <param index="1" name="forwhat" type="String" />
+ <description>
+ Replaces all [b]case-insensitive[/b] occurrences of [param what] inside the string with the given [param forwhat].
+ </description>
+ </method>
+ <method name="rfind" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="what" type="String" />
+ <param index="1" name="from" type="int" default="-1" />
+ <description>
+ Returns the index of the [b]last[/b] occurrence of [param what] in this string, or [code]-1[/code] if there are none. The search's start can be specified with [param from], continuing to the beginning of the string. This method is the reverse of [method find].
+ </description>
+ </method>
+ <method name="rfindn" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="what" type="String" />
+ <param index="1" name="from" type="int" default="-1" />
+ <description>
+ Returns the index of the [b]last[/b] [b]case-insensitive[/b] occurrence of [param what] in this string, or [code]-1[/code] if there are none. The starting search index can be specified with [param from], continuing to the beginning of the string. This method is the reverse of [method findn].
+ </description>
+ </method>
+ <method name="right" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="length" type="int" />
+ <description>
+ Returns the last [param length] characters from the end of the string. If [param length] is negative, strips the first [param length] characters from the string's beginning.
+ [codeblock]
+ print("Hello World!".right(3)) # Prints "ld!"
+ print("Hello World!".right(-4)) # Prints "o World!"
+ [/codeblock]
+ </description>
+ </method>
+ <method name="rpad" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="min_length" type="int" />
+ <param index="1" name="character" type="String" default="&quot; &quot;" />
+ <description>
+ Formats the string to be at least [param min_length] long, by adding [param character]s to the right of the string, if necessary. See also [method lpad].
+ </description>
+ </method>
+ <method name="rsplit" qualifiers="const">
+ <return type="PackedStringArray" />
+ <param index="0" name="delimiter" type="String" default="&quot;&quot;" />
+ <param index="1" name="allow_empty" type="bool" default="true" />
+ <param index="2" name="maxsplit" type="int" default="0" />
+ <description>
+ Splits the string using a [param delimiter] and returns an array of the substrings, starting from the end of the string. The splits in the returned array appear in the same order as the original string. If [param delimiter] is an empty string, each substring will be a single character.
+ If [param allow_empty] is [code]false[/code], empty strings between adjacent delimiters are excluded from the array.
+ If [param maxsplit] is greater than [code]0[/code], the number of splits may not exceed [param maxsplit]. By default, the entire string is split, which is mostly identical to [method split].
+ [b]Example:[/b]
+ [codeblocks]
+ [gdscript]
+ var some_string = "One,Two,Three,Four"
+ var some_array = some_string.rsplit(",", true, 1)
+
+ print(some_array.size()) # Prints 2
+ print(some_array[0]) # Prints "One,Two,Three"
+ print(some_array[1]) # Prints "Four"
+ [/gdscript]
+ [csharp]
+ // In C#, there is no String.RSplit() method.
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
+ <method name="rstrip" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="chars" type="String" />
+ <description>
+ Removes a set of characters defined in [param chars] from the string's end. See also [method lstrip].
+ [b]Note:[/b] [param chars] is not a suffix. Use [method trim_suffix] to remove a single suffix, rather than a set of characters.
+ </description>
+ </method>
+ <method name="sha1_buffer" qualifiers="const">
+ <return type="PackedByteArray" />
+ <description>
+ Returns the [url=https://en.wikipedia.org/wiki/SHA-1]SHA-1[/url] hash of the string as a [PackedByteArray].
+ </description>
+ </method>
+ <method name="sha1_text" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the [url=https://en.wikipedia.org/wiki/SHA-1]SHA-1[/url] hash of the string as another [String].
+ </description>
+ </method>
+ <method name="sha256_buffer" qualifiers="const">
+ <return type="PackedByteArray" />
+ <description>
+ Returns the [url=https://en.wikipedia.org/wiki/SHA-2]SHA-256[/url] hash of the string as a [PackedByteArray].
+ </description>
+ </method>
+ <method name="sha256_text" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the [url=https://en.wikipedia.org/wiki/SHA-2]SHA-256[/url] hash of the string as another [String].
+ </description>
+ </method>
+ <method name="similarity" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="text" type="String" />
+ <description>
+ Returns the similarity index ([url=https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient]Sorensen-Dice coefficient[/url]) of this string compared to another. A result of [code]1.0[/code] means totally similar, while [code]0.0[/code] means totally dissimilar.
+ [codeblock]
+ print("ABC123".similarity("ABC123")) # Prints 1.0
+ print("ABC123".similarity("XYZ456")) # Prints 0.0
+ print("ABC123".similarity("123ABC")) # Prints 0.8
+ print("ABC123".similarity("abc123")) # Prints 0.4
+ [/codeblock]
+ </description>
+ </method>
+ <method name="simplify_path" qualifiers="const">
+ <return type="String" />
+ <description>
+ If the string is a valid file path, converts the string into a canonical path. This is the shortest possible path, without [code]"./"[/code], and all the unnecessary [code]".."[/code] and [code]"/"[/code].
+ [codeblock]
+ var simple_path = "./path/to///../file".simplify_path()
+ print(simple_path) # Prints "path/file"
+ [/codeblock]
+ </description>
+ </method>
+ <method name="split" qualifiers="const">
+ <return type="PackedStringArray" />
+ <param index="0" name="delimiter" type="String" default="&quot;&quot;" />
+ <param index="1" name="allow_empty" type="bool" default="true" />
+ <param index="2" name="maxsplit" type="int" default="0" />
+ <description>
+ Splits the string using a [param delimiter] and returns an array of the substrings. If [param delimiter] is an empty string, each substring will be a single character. This method is the opposite of [method join].
+ If [param allow_empty] is [code]false[/code], empty strings between adjacent delimiters are excluded from the array.
+ If [param maxsplit] is greater than [code]0[/code], the number of splits may not exceed [param maxsplit]. By default, the entire string is split.
+ [b]Example:[/b]
+ [codeblocks]
+ [gdscript]
+ var some_array = "One,Two,Three,Four".split(",", true, 2)
+
+ print(some_array.size()) # Prints 3
+ print(some_array[0]) # Prints "One"
+ print(some_array[1]) # Prints "Two"
+ print(some_array[2]) # Prints "Three,Four"
+ [/gdscript]
+ [csharp]
+ // C#'s `Split()` does not support the `maxsplit` parameter.
+ var someArray = "One,Two,Three".Split(",");
+
+ GD.Print(someArray[0]); // Prints "One"
+ GD.Print(someArray[1]); // Prints "Two"
+ GD.Print(someArray[2]); // Prints "Three"
+ [/csharp]
+ [/codeblocks]
+ [b]Note:[/b] If you only need one substring from the array, consider using [method get_slice] which is faster. If you need to split strings with more complex rules, use the [RegEx] class instead.
+ </description>
+ </method>
+ <method name="split_floats" qualifiers="const">
+ <return type="PackedFloat64Array" />
+ <param index="0" name="delimiter" type="String" />
+ <param index="1" name="allow_empty" type="bool" default="true" />
+ <description>
+ Splits the string into floats by using a [param delimiter] and returns a [PackedFloat64Array].
+ If [param allow_empty] is [code]false[/code], empty or invalid [float] conversions between adjacent delimiters are excluded.
+ [codeblock]
+ var a = "1,2,4.5".split_floats(",") # a is [1.0, 2.0, 4.5]
+ var c = "1| ||4.5".split_floats("|") # c is [1.0, 0.0, 0.0, 4.5]
+ var b = "1| ||4.5".split_floats("|", false) # b is [1.0, 4.5]
+ [/codeblock]
+ </description>
+ </method>
+ <method name="strip_edges" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="left" type="bool" default="true" />
+ <param index="1" name="right" type="bool" default="true" />
+ <description>
+ Strips all non-printable characters from the beginning and the end of the string. These include spaces, tabulations ([code]\t[/code]), and newlines ([code]\n[/code] [code]\r[/code]).
+ If [param left] is [code]false[/code], ignores the string's beginning. Likewise, if [param right] is [code]false[/code], ignores the string's end.
+ </description>
+ </method>
+ <method name="strip_escapes" qualifiers="const">
+ <return type="String" />
+ <description>
+ Strips all escape characters from the string. These include all non-printable control characters of the first page of the ASCII table (values from 0 to 31), such as tabulation ([code]\t[/code]) and newline ([code]\n[/code], [code]\r[/code]) characters, but [i]not[/i] spaces.
+ </description>
+ </method>
+ <method name="substr" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="from" type="int" />
+ <param index="1" name="len" type="int" default="-1" />
+ <description>
+ Returns part of the string from the position [param from] with length [param len]. If [param len] is [code]-1[/code] (as by default), returns the rest of the string starting from the given position.
+ </description>
+ </method>
+ <method name="to_ascii_buffer" qualifiers="const">
+ <return type="PackedByteArray" />
+ <description>
+ Converts the string to an [url=https://en.wikipedia.org/wiki/ASCII]ASCII[/url]/Latin-1 encoded [PackedByteArray]. This method is slightly faster than [method to_utf8_buffer], but replaces all unsupported characters with spaces.
+ </description>
+ </method>
+ <method name="to_camel_case" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the string converted to [code]camelCase[/code].
+ </description>
+ </method>
+ <method name="to_float" qualifiers="const">
+ <return type="float" />
+ <description>
+ Converts the string representing a decimal number into a [float]. This method stops on the first non-number character, except the first decimal point ([code].[/code]) and the exponent letter ([code]e[/code]). See also [method is_valid_float].
+ [codeblock]
+ var a = "12.35".to_float() # a is 12.35
+ var b = "1.2.3".to_float() # b is 1.2
+ var c = "12xy3".to_float() # c is 12.0
+ var d = "1e3".to_float() # d is 1000.0
+ var e = "Hello!".to_int() # e is 0.0
+ [/codeblock]
+ </description>
+ </method>
+ <method name="to_int" qualifiers="const">
+ <return type="int" />
+ <description>
+ Converts the string representing an integer number into an [int]. This method removes any non-number character and stops at the first decimal point ([code].[/code]). See also [method is_valid_int].
+ [codeblock]
+ var a = "123".to_int() # a is 123
+ var b = "x1y2z3".to_int() # b is 123
+ var c = "-1.2.3".to_int() # c is -1
+ var d = "Hello!".to_int() # d is 0
+ [/codeblock]
+ </description>
+ </method>
+ <method name="to_lower" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the string converted to lowercase.
+ </description>
+ </method>
+ <method name="to_pascal_case" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the string converted to [code]PascalCase[/code].
+ </description>
+ </method>
+ <method name="to_snake_case" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the string converted to [code]snake_case[/code].
+ </description>
+ </method>
+ <method name="to_upper" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns the string converted to uppercase.
+ </description>
+ </method>
+ <method name="to_utf16_buffer" qualifiers="const">
+ <return type="PackedByteArray" />
+ <description>
+ Converts the string to a [url=https://en.wikipedia.org/wiki/UTF-16]UTF-16[/url] encoded [PackedByteArray].
+ </description>
+ </method>
+ <method name="to_utf32_buffer" qualifiers="const">
+ <return type="PackedByteArray" />
+ <description>
+ Converts the string to a [url=https://en.wikipedia.org/wiki/UTF-32]UTF-32[/url] encoded [PackedByteArray].
+ </description>
+ </method>
+ <method name="to_utf8_buffer" qualifiers="const">
+ <return type="PackedByteArray" />
+ <description>
+ Converts the string to a [url=https://en.wikipedia.org/wiki/UTF-8]UTF-8[/url] encoded [PackedByteArray]. This method is slightly slower than [method to_ascii_buffer], but supports all UTF-8 characters. For most cases, prefer using this method.
+ </description>
+ </method>
+ <method name="trim_prefix" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="prefix" type="String" />
+ <description>
+ Removes the given [param prefix] from the start of the string, or returns the string unchanged.
+ </description>
+ </method>
+ <method name="trim_suffix" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="suffix" type="String" />
+ <description>
+ Removes the given [param suffix] from the end of the string, or returns the string unchanged.
+ </description>
+ </method>
+ <method name="unicode_at" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="at" type="int" />
+ <description>
+ Returns the character code at position [param at].
+ </description>
+ </method>
+ <method name="uri_decode" qualifiers="const">
+ <return type="String" />
+ <description>
+ Decodes the string from its URL-encoded format. This method is meant to properly decode the parameters in a URL when receiving an HTTP request.
+ [codeblocks]
+ [gdscript]
+ var url = "$DOCS_URL/?highlight=Godot%20Engine%3%docs"
+ print(url.uri_decode()) # Prints "$DOCS_URL/?hightlight=Godot Engine:docs"
+ [/gdscript]
+ [csharp]
+ var url = "$DOCS_URL/?highlight=Godot%20Engine%3%docs"
+ GD.Print(url.URIDecode()) // Prints "$DOCS_URL/?hightlight=Godot Engine:docs"
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
+ <method name="uri_encode" qualifiers="const">
+ <return type="String" />
+ <description>
+ Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request.
+ [codeblocks]
+ [gdscript]
+ var prefix = "$DOCS_URL/?hightlight="
+ var url = prefix + "Godot Engine:docs".uri_encode()
+
+ print(url) # Prints "$DOCS_URL/?highlight=Godot%20Engine%3%docs"
+ [/gdscript]
+ [csharp]
+ var prefix = "$DOCS_URL/?hightlight=";
+ var url = prefix + "Godot Engine:docs".URIEncode();
+
+ GD.Print(url); // Prints "$DOCS_URL/?highlight=Godot%20Engine%3%docs"
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
+ <method name="validate_node_name" qualifiers="const">
+ <return type="String" />
+ <description>
+ Removes all characters that are not allowed in [member Node.name] from the string ([code].[/code] [code]:[/code] [code]@[/code] [code]/[/code] [code]"[/code] [code]%[/code]).
+ </description>
+ </method>
+ <method name="xml_escape" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="escape_quotes" type="bool" default="false" />
+ <description>
+ Returns a copy of the string with special characters escaped using the XML standard. If [param escape_quotes] is [code]true[/code], the single quote ([code]'[/code]) and double quote ([code]"[/code]) characters are also escaped.
+ </description>
+ </method>
+ <method name="xml_unescape" qualifiers="const">
+ <return type="String" />
+ <description>
+ Returns a copy of the string with escaped characters replaced by their meanings according to the XML standard.
</description>
</method>
</methods>
@@ -55,6 +944,24 @@
Returns [code]true[/code] if the [StringName] and [param right] do not refer to the same name. Comparisons between [StringName]s are much faster than regular [String] comparisons.
</description>
</operator>
+ <operator name="operator %">
+ <return type="String" />
+ <param index="0" name="right" type="Variant" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="String" />
+ <param index="0" name="right" type="String" />
+ <description>
+ </description>
+ </operator>
+ <operator name="operator +">
+ <return type="String" />
+ <param index="0" name="right" type="StringName" />
+ <description>
+ </description>
+ </operator>
<operator name="operator &lt;">
<return type="bool" />
<param index="0" name="right" type="StringName" />
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index b3e55b5cd0..4fc6ee3312 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -235,7 +235,7 @@
<param index="1" name="size" type="Vector2i" />
<param index="2" name="glyph" type="int" />
<description>
- Returns resource id of the cache texture containing the glyph.
+ Returns resource ID of the cache texture containing the glyph.
[b]Note:[/b] If there are pending glyphs to render, calling this function might trigger the texture cache update.
</description>
</method>
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index 5a24483774..7fc6ba8161 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -616,6 +616,7 @@
</constant>
<constant name="TILE_SHAPE_ISOMETRIC" value="1" enum="TileShape">
Diamond tile shape (for isometric look).
+ [b]Note:[/b] Isometric [TileSet] works best if [TileMap] and all its layers have Y-sort enabled.
</constant>
<constant name="TILE_SHAPE_HALF_OFFSET_SQUARE" value="2" enum="TileShape">
Rectangular tile shape with one row/column out of two offset by half a tile.
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index 6a016c3ebd..629c271417 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -70,7 +70,7 @@
<return type="int" />
<param index="0" name="position" type="Vector2" />
<description>
- Returns the button id at [param position], or -1 if no button is there.
+ Returns the button ID at [param position], or -1 if no button is there.
</description>
</method>
<method name="get_column_at_position" qualifiers="const">
diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml
index a8ffef427f..ec6b166e57 100644
--- a/doc/classes/TreeItem.xml
+++ b/doc/classes/TreeItem.xml
@@ -78,7 +78,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="id" type="int" />
<description>
- Returns the button index if there is a button with id [param id] in column [param column], otherwise returns -1.
+ Returns the button index if there is a button with ID [param id] in column [param column], otherwise returns -1.
</description>
</method>
<method name="get_button_count" qualifiers="const">
@@ -93,7 +93,7 @@
<param index="0" name="column" type="int" />
<param index="1" name="button_idx" type="int" />
<description>
- Returns the id for the button at index [param button_idx] in column [param column].
+ Returns the ID for the button at index [param button_idx] in column [param column].
</description>
</method>
<method name="get_button_tooltip_text" qualifiers="const">
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index 1cd73688ee..c47933ccb7 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
2-element structure that can be used to represent positions in 2D space or any other pair of numeric values.
- It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option [code]float=64[/code].
+ It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option [code]precision=double[/code].
See [Vector2i] for its integer counterpart.
[b]Note:[/b] In a boolean context, a Vector2 will evaluate to [code]false[/code] if it's equal to [code]Vector2(0, 0)[/code]. Otherwise, a Vector2 will always evaluate to [code]true[/code].
</description>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 1d7eda6bb9..c961825ab3 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
3-element structure that can be used to represent positions in 3D space or any other triplet of numeric values.
- It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option [code]float=64[/code].
+ It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option [code]precision=double[/code].
See [Vector3i] for its integer counterpart.
[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 will always evaluate to [code]true[/code].
</description>
diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml
index d15ae35b59..c811817bdc 100644
--- a/doc/classes/Vector4.xml
+++ b/doc/classes/Vector4.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
4-element structure that can be used to represent any quadruplet of numeric values.
- It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option [code]float=64[/code].
+ It uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option [code]precision=double[/code].
See [Vector4i] for its integer counterpart.
[b]Note:[/b] In a boolean context, a Vector4 will evaluate to [code]false[/code] if it's equal to [code]Vector4(0, 0, 0, 0)[/code]. Otherwise, a Vector4 will always evaluate to [code]true[/code].
</description>
diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml
index d736f103ab..16ca486e4a 100644
--- a/doc/classes/Window.xml
+++ b/doc/classes/Window.xml
@@ -10,6 +10,66 @@
<tutorials>
</tutorials>
<methods>
+ <method name="add_theme_color_override">
+ <return type="void" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="color" type="Color" />
+ <description>
+ Creates a local override for a theme [Color] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_color_override].
+ See also [method get_theme_color] and [method Control.add_theme_color_override] for more details.
+ </description>
+ </method>
+ <method name="add_theme_constant_override">
+ <return type="void" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="constant" type="int" />
+ <description>
+ Creates a local override for a theme constant with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_constant_override].
+ See also [method get_theme_constant].
+ </description>
+ </method>
+ <method name="add_theme_font_override">
+ <return type="void" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="font" type="Font" />
+ <description>
+ Creates a local override for a theme [Font] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_override].
+ See also [method get_theme_font].
+ </description>
+ </method>
+ <method name="add_theme_font_size_override">
+ <return type="void" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="font_size" type="int" />
+ <description>
+ Creates a local override for a theme font size with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_size_override].
+ See also [method get_theme_font_size].
+ </description>
+ </method>
+ <method name="add_theme_icon_override">
+ <return type="void" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="texture" type="Texture2D" />
+ <description>
+ Creates a local override for a theme icon with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_icon_override].
+ See also [method get_theme_icon].
+ </description>
+ </method>
+ <method name="add_theme_stylebox_override">
+ <return type="void" />
+ <param index="0" name="name" type="StringName" />
+ <param index="1" name="stylebox" type="StyleBox" />
+ <description>
+ Creates a local override for a theme [StyleBox] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_stylebox_override].
+ See also [method get_theme_stylebox] and [method Control.add_theme_stylebox_override] for more details.
+ </description>
+ </method>
+ <method name="begin_bulk_theme_override">
+ <return type="void" />
+ <description>
+ Prevents [code]*_theme_*_override[/code] methods from emitting [constant NOTIFICATION_THEME_CHANGED] until [method end_bulk_theme_override] is called.
+ </description>
+ </method>
<method name="can_draw" qualifiers="const">
<return type="bool" />
<description>
@@ -22,6 +82,12 @@
Requests an update of the [Window] size to fit underlying [Control] nodes.
</description>
</method>
+ <method name="end_bulk_theme_override">
+ <return type="void" />
+ <description>
+ Ends a bulk theme override update. See [method begin_bulk_theme_override].
+ </description>
+ </method>
<method name="get_contents_minimum_size" qualifiers="const">
<return type="Vector2" />
<description>
@@ -58,7 +124,7 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns the [Color] at [param name] if the theme has [param theme_type].
+ Returns a [Color] from the first matching [Theme] in the tree if that [Theme] has a color item with the specified [param name] and [param theme_type].
See [method Control.get_theme_color] for more details.
</description>
</method>
@@ -67,29 +133,29 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns the constant at [param name] if the theme has [param theme_type].
+ Returns a constant from the first matching [Theme] in the tree if that [Theme] has a constant item with the specified [param name] and [param theme_type].
See [method Control.get_theme_color] for more details.
</description>
</method>
<method name="get_theme_default_base_scale" qualifiers="const">
<return type="float" />
<description>
- Returns the default base scale defined in the attached [Theme].
- See [member Theme.default_base_scale] for more details.
+ Returns the default base scale value from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_base_scale] value.
+ See [method Control.get_theme_color] for details.
</description>
</method>
<method name="get_theme_default_font" qualifiers="const">
<return type="Font" />
<description>
- Returns the default [Font] defined in the attached [Theme].
- See [member Theme.default_font] for more details.
+ Returns the default font from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_font] value.
+ See [method Control.get_theme_color] for details.
</description>
</method>
<method name="get_theme_default_font_size" qualifiers="const">
<return type="int" />
<description>
- Returns the default font size defined in the attached [Theme].
- See [member Theme.default_font_size] for more details.
+ Returns the default font size value from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_font_size] value.
+ See [method Control.get_theme_color] for details.
</description>
</method>
<method name="get_theme_font" qualifiers="const">
@@ -97,8 +163,8 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns the [Font] at [param name] if the theme has [param theme_type].
- See [method Control.get_theme_color] for more details.
+ Returns a [Font] from the first matching [Theme] in the tree if that [Theme] has a font item with the specified [param name] and [param theme_type].
+ See [method Control.get_theme_color] for details.
</description>
</method>
<method name="get_theme_font_size" qualifiers="const">
@@ -106,8 +172,8 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns the font size at [param name] if the theme has [param theme_type].
- See [method Control.get_theme_color] for more details.
+ Returns a font size from the first matching [Theme] in the tree if that [Theme] has a font size item with the specified [param name] and [param theme_type].
+ See [method Control.get_theme_color] for details.
</description>
</method>
<method name="get_theme_icon" qualifiers="const">
@@ -115,8 +181,8 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns the icon at [param name] if the theme has [param theme_type].
- See [method Control.get_theme_color] for more details.
+ Returns an icon from the first matching [Theme] in the tree if that [Theme] has an icon item with the specified [param name] and [param theme_type].
+ See [method Control.get_theme_color] for details.
</description>
</method>
<method name="get_theme_stylebox" qualifiers="const">
@@ -124,8 +190,8 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns the [StyleBox] at [param name] if the theme has [param theme_type].
- See [method Control.get_theme_color] for more details.
+ Returns a [StyleBox] from the first matching [Theme] in the tree if that [Theme] has a stylebox item with the specified [param name] and [param theme_type].
+ See [method Control.get_theme_color] for details.
</description>
</method>
<method name="grab_focus">
@@ -145,7 +211,16 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns [code]true[/code] if [Color] with [param name] is in [param theme_type].
+ Returns [code]true[/code] if there is a matching [Theme] in the tree that has a color item with the specified [param name] and [param theme_type].
+ See [method Control.get_theme_color] for details.
+ </description>
+ </method>
+ <method name="has_theme_color_override" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="name" type="StringName" />
+ <description>
+ Returns [code]true[/code] if there is a local override for a theme [Color] with the specified [param name] in this [Control] node.
+ See [method add_theme_color_override].
</description>
</method>
<method name="has_theme_constant" qualifiers="const">
@@ -153,7 +228,16 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns [code]true[/code] if constant with [param name] is in [param theme_type].
+ Returns [code]true[/code] if there is a matching [Theme] in the tree that has a constant item with the specified [param name] and [param theme_type].
+ See [method Control.get_theme_color] for details.
+ </description>
+ </method>
+ <method name="has_theme_constant_override" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="name" type="StringName" />
+ <description>
+ Returns [code]true[/code] if there is a local override for a theme constant with the specified [param name] in this [Control] node.
+ See [method add_theme_constant_override].
</description>
</method>
<method name="has_theme_font" qualifiers="const">
@@ -161,7 +245,16 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns [code]true[/code] if [Font] with [param name] is in [param theme_type].
+ Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font item with the specified [param name] and [param theme_type].
+ See [method Control.get_theme_color] for details.
+ </description>
+ </method>
+ <method name="has_theme_font_override" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="name" type="StringName" />
+ <description>
+ Returns [code]true[/code] if there is a local override for a theme [Font] with the specified [param name] in this [Control] node.
+ See [method add_theme_font_override].
</description>
</method>
<method name="has_theme_font_size" qualifiers="const">
@@ -169,7 +262,16 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns [code]true[/code] if font size with [param name] is in [param theme_type].
+ Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font size item with the specified [param name] and [param theme_type].
+ See [method Control.get_theme_color] for details.
+ </description>
+ </method>
+ <method name="has_theme_font_size_override" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="name" type="StringName" />
+ <description>
+ Returns [code]true[/code] if there is a local override for a theme font size with the specified [param name] in this [Control] node.
+ See [method add_theme_font_size_override].
</description>
</method>
<method name="has_theme_icon" qualifiers="const">
@@ -177,7 +279,16 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns [code]true[/code] if icon with [param name] is in [param theme_type].
+ Returns [code]true[/code] if there is a matching [Theme] in the tree that has an icon item with the specified [param name] and [param theme_type].
+ See [method Control.get_theme_color] for details.
+ </description>
+ </method>
+ <method name="has_theme_icon_override" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="name" type="StringName" />
+ <description>
+ Returns [code]true[/code] if there is a local override for a theme icon with the specified [param name] in this [Control] node.
+ See [method add_theme_icon_override].
</description>
</method>
<method name="has_theme_stylebox" qualifiers="const">
@@ -185,7 +296,16 @@
<param index="0" name="name" type="StringName" />
<param index="1" name="theme_type" type="StringName" default="&quot;&quot;" />
<description>
- Returns [code]true[/code] if [StyleBox] with [param name] is in [param theme_type].
+ Returns [code]true[/code] if there is a matching [Theme] in the tree that has a stylebox item with the specified [param name] and [param theme_type].
+ See [method Control.get_theme_color] for details.
+ </description>
+ </method>
+ <method name="has_theme_stylebox_override" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="name" type="StringName" />
+ <description>
+ Returns [code]true[/code] if there is a local override for a theme [StyleBox] with the specified [param name] in this [Control] node.
+ See [method add_theme_stylebox_override].
</description>
</method>
<method name="hide">
@@ -264,6 +384,48 @@
If the [Window] is embedded, has the same effect as [method popup].
</description>
</method>
+ <method name="remove_theme_color_override">
+ <return type="void" />
+ <param index="0" name="name" type="StringName" />
+ <description>
+ Removes a local override for a theme [Color] with the specified [param name] previously added by [method add_theme_color_override] or via the Inspector dock.
+ </description>
+ </method>
+ <method name="remove_theme_constant_override">
+ <return type="void" />
+ <param index="0" name="name" type="StringName" />
+ <description>
+ Removes a local override for a theme constant with the specified [param name] previously added by [method add_theme_constant_override] or via the Inspector dock.
+ </description>
+ </method>
+ <method name="remove_theme_font_override">
+ <return type="void" />
+ <param index="0" name="name" type="StringName" />
+ <description>
+ Removes a local override for a theme [Font] with the specified [param name] previously added by [method add_theme_font_override] or via the Inspector dock.
+ </description>
+ </method>
+ <method name="remove_theme_font_size_override">
+ <return type="void" />
+ <param index="0" name="name" type="StringName" />
+ <description>
+ Removes a local override for a theme font size with the specified [param name] previously added by [method add_theme_font_size_override] or via the Inspector dock.
+ </description>
+ </method>
+ <method name="remove_theme_icon_override">
+ <return type="void" />
+ <param index="0" name="name" type="StringName" />
+ <description>
+ Removes a local override for a theme icon with the specified [param name] previously added by [method add_theme_icon_override] or via the Inspector dock.
+ </description>
+ </method>
+ <method name="remove_theme_stylebox_override">
+ <return type="void" />
+ <param index="0" name="name" type="StringName" />
+ <description>
+ Removes a local override for a theme [StyleBox] with the specified [param name] previously added by [method add_theme_stylebox_override] or via the Inspector dock.
+ </description>
+ </method>
<method name="request_attention">
<return type="void" />
<description>
@@ -373,8 +535,8 @@
The window's size in pixels.
</member>
<member name="theme" type="Theme" setter="set_theme" getter="get_theme">
- The [Theme] resource that determines the style of the underlying [Control] nodes.
- [Window] styles will have no effect unless the window is embedded.
+ The [Theme] resource this node and all its [Control] and [Window] children use. If a child node has its own [Theme] resource set, theme items are merged with child's definitions having higher priority.
+ [b]Note:[/b] [Window] styles will have no effect unless the window is embedded.
</member>
<member name="theme_type_variation" type="StringName" setter="set_theme_type_variation" getter="get_theme_type_variation" default="&amp;&quot;&quot;">
The name of a theme type variation used by this [Window] to look up its own theme items. See [member Control.theme_type_variation] for more details.
diff --git a/doc/classes/XRInterfaceExtension.xml b/doc/classes/XRInterfaceExtension.xml
index 0fe54e947f..5ad67a7ea9 100644
--- a/doc/classes/XRInterfaceExtension.xml
+++ b/doc/classes/XRInterfaceExtension.xml
@@ -24,7 +24,7 @@
<method name="_get_camera_feed_id" qualifiers="virtual const">
<return type="int" />
<description>
- Returns the camera feed id for the [CameraFeed] registered with the [CameraServer] that should be presented as the background on an AR capable device (if applicable).
+ Returns the camera feed ID for the [CameraFeed] registered with the [CameraServer] that should be presented as the background on an AR capable device (if applicable).
</description>
</method>
<method name="_get_camera_transform" qualifiers="virtual">
diff --git a/doc/classes/float.xml b/doc/classes/float.xml
index a196021249..755ce1200d 100644
--- a/doc/classes/float.xml
+++ b/doc/classes/float.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
The [float] built-in type is a 64-bit double-precision floating-point number, equivalent to [code]double[/code] in C++. This type has 14 reliable decimal digits of precision. The [float] type can be stored in [Variant], which is the generic type used by the engine. The maximum value of [float] is approximately [code]1.79769e308[/code], and the minimum is approximately [code]-1.79769e308[/code].
- Many methods and properties in the engine use 32-bit single-precision floating-point numbers instead, equivalent to [code]float[/code] in C++, which have 6 reliable decimal digits of precision. For data structures such as [Vector2] and [Vector3], Godot uses 32-bit floating-point numbers by default, but it can be changed to use 64-bit doubles if Godot is compiled with the [code]float=64[/code] option.
+ Many methods and properties in the engine use 32-bit single-precision floating-point numbers instead, equivalent to [code]float[/code] in C++, which have 6 reliable decimal digits of precision. For data structures such as [Vector2] and [Vector3], Godot uses 32-bit floating-point numbers by default, but it can be changed to use 64-bit doubles if Godot is compiled with the [code]precision=double[/code] option.
Math done using the [float] type is not guaranteed to be exact or deterministic, and will often result in small errors. You should usually use the [method @GlobalScope.is_equal_approx] and [method @GlobalScope.is_zero_approx] methods instead of [code]==[/code] to compare [float] values for equality.
</description>
<tutorials>