diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Array.xml | 2 | ||||
-rw-r--r-- | doc/classes/Dictionary.xml | 1 | ||||
-rw-r--r-- | doc/classes/Node.xml | 12 | ||||
-rw-r--r-- | doc/classes/Object.xml | 2 |
4 files changed, 8 insertions, 9 deletions
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 20296bbf45..7593f7dff4 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -20,7 +20,7 @@ var array2 = [3, "Four"] print(array1 + array2) # ["One", 2, 3, "Four"] [/codeblock] - Arrays are always passed by reference. + [b]Note:[/b] Arrays are always passed by reference. To get a copy of an array which can be modified independently of the original array, use [method duplicate]. </description> <tutorials> </tutorials> diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index e982e00d6d..385f4b7e59 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -7,6 +7,7 @@ Dictionary type. Associative container which contains values referenced by unique keys. Dictionaries are composed of pairs of keys (which must be unique) and values. Dictionaries will preserve the insertion order when adding elements, even though this may not be reflected when printing the dictionary. In other programming languages, this data structure is sometimes referred to as an hash map or associative array. You can define a dictionary by placing a comma-separated list of [code]key: value[/code] pairs in curly braces [code]{}[/code]. Erasing elements while iterating over them [b]is not supported[/b] and will result in undefined behavior. + [b]Note:[/b] Dictionaries are always passed by reference. To get a copy of a dictionary which can be modified independently of the original dictionary, use [method duplicate]. Creating a dictionary: [codeblock] var my_dir = {} # Creates an empty dictionary. diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 0c0d16753a..04c8d2bf57 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -129,21 +129,19 @@ child_node.get_parent().remove_child(child_node) add_child(child_node) [/codeblock] - If you need the child node to be added below a specific node in the list of children, use [method add_child_below_node] instead of this method. + If you need the child node to be added below a specific node in the list of children, use [method add_sibling] instead of this method. [b]Note:[/b] If you want a child to be persisted to a [PackedScene], you must set [member owner] in addition to calling [method add_child]. This is typically relevant for [url=https://godot.readthedocs.io/en/latest/tutorials/misc/running_code_in_the_editor.html]tool scripts[/url] and [url=https://godot.readthedocs.io/en/latest/tutorials/plugins/editor/index.html]editor plugins[/url]. If [method add_child] is called without setting [member owner], the newly added [Node] will not be visible in the scene tree, though it will be visible in the 2D/3D view. </description> </method> - <method name="add_child_below_node"> + <method name="add_sibling"> <return type="void"> </return> - <argument index="0" name="preceding_node" type="Node"> + <argument index="0" name="sibling" type="Node"> </argument> - <argument index="1" name="node" type="Node"> - </argument> - <argument index="2" name="legible_unique_name" type="bool" default="false"> + <argument index="1" name="legible_unique_name" type="bool" default="false"> </argument> <description> - Adds a child node below the [code]preceding_node[/code]. + Adds a [code]sibling[/code] node to current's node parent, at the the same level as that node, right below it. If [code]legible_unique_name[/code] is [code]true[/code], the child node will have an human-readable name based on the name of the node being instanced instead of its type. Use [method add_child] instead of this method if you don't need the child node to be added below a specific node in the list of children. </description> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index 35e87d1a2a..87bcab25db 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -192,7 +192,7 @@ <return type="void"> </return> <description> - Deletes the object from memory. Any pre-existing reference to the freed object will now return [code]null[/code]. + Deletes the object from memory. Any pre-existing reference to the freed object will become invalid, e.g. [code]is_instance_valid(object)[/code] will return [code]false[/code]. </description> </method> <method name="get" qualifiers="const"> |