diff options
author | Max Hilbrunner <mhilbrunner@users.noreply.github.com> | 2022-08-19 01:41:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-19 01:41:25 +0200 |
commit | 8cc0d07b498c50f799cda631182209101e1e19e1 (patch) | |
tree | edac56c34c3958660cd7d0d9f424a939e5120f27 /doc/classes | |
parent | 6f273d21569dce07b104e324768b89e1a5f06d63 (diff) | |
parent | 7dbacdc2f71cf3cc9b10aa0e2d8a4b654b0f871e (diff) |
Merge pull request #59851 from Calinou/doc-object-meta-editor-only
Document that Object metadata starting with `_` is editor-only
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Object.xml | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index ba219d8603..71e779e274 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -367,7 +367,8 @@ <param index="1" name="default" type="Variant" default="null" /> <description> Returns the object's metadata entry for the given [param name]. - Throws error if the entry does not exist, unless [param default] is not [code]null[/code] (in which case the default value will be returned). + Throws error if the entry does not exist, unless [param default] is not [code]null[/code] (in which case the default value will be returned). See also [method has_meta], [method set_meta] and [method remove_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. </description> </method> <method name="get_meta_list" qualifiers="const"> @@ -412,7 +413,8 @@ <return type="bool" /> <param index="0" name="name" type="StringName" /> <description> - Returns [code]true[/code] if a metadata entry is found with the given [param name]. + 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] 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. </description> </method> <method name="has_method" qualifiers="const"> @@ -483,7 +485,8 @@ <return type="void" /> <param index="0" name="name" type="StringName" /> <description> - Removes a given entry from the object's metadata. See also [method set_meta]. + Removes a given entry 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. </description> </method> <method name="set"> @@ -546,7 +549,8 @@ <param index="1" name="value" type="Variant" /> <description> Adds, changes or removes a given entry in the object's metadata. Metadata are serialized and can take any [Variant] value. - To remove a given entry from the object's metadata, use [method remove_meta]. Metadata is also removed if its value is set to [code]null[/code]. This means you can also use [code]set_meta("name", null)[/code] to remove metadata for [code]"name"[/code]. + To remove a given entry from the object's metadata, use [method remove_meta]. Metadata is also removed if its value is set to [code]null[/code]. This means you can also use [code]set_meta("name", null)[/code] to remove metadata for [code]"name"[/code]. 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 and should not be edited. </description> </method> <method name="set_script"> |