Updated Object's class reference documentation for set_meta to indicate metadata's name must be a valid identifier

(cherry picked from commit cdc2e6d872)
This commit is contained in:
Devin 2023-04-26 08:43:36 -05:00 committed by Yuri Sizov
parent b118d89eed
commit 412d947dc3
1 changed files with 7 additions and 3 deletions

View File

@ -593,7 +593,8 @@
<param index="1" name="default" type="Variant" default="null" /> <param index="1" name="default" type="Variant" default="null" />
<description> <description>
Returns the object's metadata value for the given entry [param name]. If the entry does not exist, returns [param default]. If [param default] is [code]null[/code], an error is also generated. Returns the object's metadata value for the given entry [param name]. If the entry does not exist, returns [param default]. If [param default] is [code]null[/code], an error is also generated.
[b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector dock and should not be edited. [b]Note:[/b] A metadata's [param name] must be a valid identifier as per [method StringName.is_valid_identifier] method.
[b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method.
</description> </description>
</method> </method>
<method name="get_meta_list" qualifiers="const"> <method name="get_meta_list" qualifiers="const">
@ -655,6 +656,7 @@
<param index="0" name="name" type="StringName" /> <param index="0" name="name" type="StringName" />
<description> <description>
Returns [code]true[/code] if a metadata entry is found with the given [param name]. See also [method get_meta], [method set_meta] and [method remove_meta]. Returns [code]true[/code] if a metadata entry is found with the given [param name]. See also [method get_meta], [method set_meta] and [method remove_meta].
[b]Note:[/b] A metadata's [param name] must be a valid identifier as per [method StringName.is_valid_identifier] method.
[b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method.
</description> </description>
</method> </method>
@ -782,7 +784,8 @@
<param index="0" name="name" type="StringName" /> <param index="0" name="name" type="StringName" />
<description> <description>
Removes the given entry [param name] from the object's metadata. See also [method has_meta], [method get_meta] and [method set_meta]. Removes the given entry [param name] from the object's metadata. See also [method has_meta], [method get_meta] and [method set_meta].
[b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited. [b]Note:[/b] A metadata's [param name] must be a valid identifier as per [method StringName.is_valid_identifier] method.
[b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method.
</description> </description>
</method> </method>
<method name="set"> <method name="set">
@ -881,7 +884,8 @@
<description> <description>
Adds or changes the entry [param name] inside the object's metadata. The metadata [param value] can be any [Variant], although some types cannot be serialized correctly. Adds or changes the entry [param name] inside the object's metadata. The metadata [param value] can be any [Variant], although some types cannot be serialized correctly.
If [param value] is [code]null[/code], the entry is removed. This is the equivalent of using [method remove_meta]. See also [method has_meta] and [method get_meta]. If [param value] is [code]null[/code], the entry is removed. This is the equivalent of using [method remove_meta]. See also [method has_meta] and [method get_meta].
[b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector dock and should not be edited. [b]Note:[/b] A metadata's [param name] must be a valid identifier as per [method StringName.is_valid_identifier] method.
[b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method.
</description> </description>
</method> </method>
<method name="set_script"> <method name="set_script">