From 7dbacdc2f71cf3cc9b10aa0e2d8a4b654b0f871e Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sun, 3 Apr 2022 23:43:51 +0200 Subject: Document that Object metadata starting with `_` is editor-only --- doc/classes/Object.xml | 12 ++++++++---- 1 file 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 @@ 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. @@ -412,7 +413,8 @@ - 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. @@ -483,7 +485,8 @@ - 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. @@ -546,7 +549,8 @@ 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. -- cgit v1.2.3