summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2022-04-16 12:23:32 +0200
committerreduz <reduzio@gmail.com>2022-04-25 12:19:17 +0200
commit8580f377a3d7d72c319e9e5489bcbe1678ad704b (patch)
tree10f6ac97697013f8c0e5ef9f3004498b0e33aaec /doc/classes
parentf4b0c7a1ea8d86c1dfd96478ca12ad1360903d9d (diff)
Implement Scene Unique Nodes
Implements https://github.com/godotengine/godot-proposals/issues/4096 * Nodes can be marked unique to the scene in the editor (or via code). * Unique nodes can be accessed via the **%** prefix at any point in the path. From that point in the path (depending on whether the scene of the path is), the unique node will be fetched. * Implementation is very optimal, as these nodes are cached.
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/Node.xml13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 7079036879..3efa49b309 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -492,6 +492,12 @@
Returns [code]true[/code] if the node is processing unhandled key input (see [method set_process_unhandled_key_input]).
</description>
</method>
+ <method name="is_unique_name_in_owner" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns whether the node is an unique name for all the other nodes owned by its [member owner].
+ </description>
+ </method>
<method name="move_child">
<return type="void" />
<argument index="0" name="child_node" type="Node" />
@@ -719,6 +725,13 @@
Sets whether this is an instance load placeholder. See [InstancePlaceholder].
</description>
</method>
+ <method name="set_unique_name_in_owner">
+ <return type="void" />
+ <argument index="0" name="enable" type="bool" />
+ <description>
+ Sets this node's name as the unique name in its [member owner]. This allows the node to be accessed as [code]%Name[/code] instead of the full path, from any node within that scene.
+ </description>
+ </method>
<method name="update_configuration_warnings">
<return type="void" />
<description>