From 3a3a2011f4e5fae48fb3d556a15fda0206f92671 Mon Sep 17 00:00:00 2001 From: Danil Alexeev Date: Tue, 19 Dec 2023 20:56:30 +0300 Subject: GDScript: Add `@export_storage` annotation --- modules/gdscript/doc_classes/@GDScript.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'modules/gdscript/doc_classes') diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml index fcb7a11a14..dcca12ab7d 100644 --- a/modules/gdscript/doc_classes/@GDScript.xml +++ b/modules/gdscript/doc_classes/@GDScript.xml @@ -598,6 +598,17 @@ [/codeblock] + + + + 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] + + -- cgit v1.2.3