summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/doc_classes
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-02-27 21:22:49 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-02-27 21:22:49 +0100
commit21ee3716c28cb8eb99117d50097a932f39311c67 (patch)
tree897cb5977649c0e9bfe8b687d1d3ec79bce607fa /modules/gdscript/doc_classes
parent1aa8e91d158c105d69f5ebae2b7fb9efc4478c57 (diff)
parent3a3a2011f4e5fae48fb3d556a15fda0206f92671 (diff)
downloadredot-engine-21ee3716c28cb8eb99117d50097a932f39311c67.tar.gz
Merge pull request #82122 from dalexeev/gds-add-export-hidden-annotation
GDScript: Add `@export_storage` annotation
Diffstat (limited to 'modules/gdscript/doc_classes')
-rw-r--r--modules/gdscript/doc_classes/@GDScript.xml11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml
index 4b009f1866..7ececce613 100644
--- a/modules/gdscript/doc_classes/@GDScript.xml
+++ b/modules/gdscript/doc_classes/@GDScript.xml
@@ -597,6 +597,17 @@
[/codeblock]
</description>
</annotation>
+ <annotation name="@export_storage">
+ <return type="void" />
+ <description>
+ Export a property with [constant PROPERTY_USAGE_STORAGE] flag. The property is not displayed in the editor, but it is serialized and stored in the scene or resource file. This can be useful for [annotation @tool] scripts. Also the property value is copied when [method Resource.duplicate] or [method Node.duplicate] is called, unlike non-exported variables.
+ [codeblock]
+ var a # Not stored in the file, not displayed in the editor.
+ @export_storage var b # Stored in the file, not displayed in the editor.
+ @export var c: int # Stored in the file, displayed in the editor.
+ [/codeblock]
+ </description>
+ </annotation>
<annotation name="@export_subgroup">
<return type="void" />
<param index="0" name="name" type="String" />