summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/doc_classes
diff options
context:
space:
mode:
authorDanil Alexeev <danil@alexeev.xyz>2023-10-05 13:50:26 +0300
committerDanil Alexeev <danil@alexeev.xyz>2023-10-05 13:50:26 +0300
commit9e2273abc7f24a7652889a1936b0d8ff71353d60 (patch)
tree105744795654a3a6c66533d3467c8e683a6959ae /modules/gdscript/doc_classes
parentc7ed5d795ef396650e1e2853cf0d76cbdb1cb45e (diff)
downloadredot-engine-9e2273abc7f24a7652889a1936b0d8ff71353d60.tar.gz
GDScript: Add error when exporting node in non [Node]-derived classes
Diffstat (limited to 'modules/gdscript/doc_classes')
-rw-r--r--modules/gdscript/doc_classes/@GDScript.xml27
1 files changed, 26 insertions, 1 deletions
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml
index 4fec745999..3da6bcf10c 100644
--- a/modules/gdscript/doc_classes/@GDScript.xml
+++ b/modules/gdscript/doc_classes/@GDScript.xml
@@ -285,11 +285,36 @@
<description>
Mark the following property as exported (editable in the Inspector dock and saved to disk). To control the type of the exported property, use the type hint notation.
[codeblock]
+ extends Node
+
+ enum Direction {LEFT, RIGHT, UP, DOWN}
+
+ # Built-in types.
@export var string = ""
@export var int_number = 5
@export var float_number: float = 5
+
+ # Enums.
+ @export var type: Variant.Type
+ @export var format: Image.Format
+ @export var direction: Direction
+
+ # Resources.
@export var image: Image
- [/codeblock]
+ @export var custom_resource: CustomResource
+
+ # Nodes.
+ @export var node: Node
+ @export var custom_node: CustomNode
+
+ # Typed arrays.
+ @export var int_array: Array[int]
+ @export var direction_array: Array[Direction]
+ @export var image_array: Array[Image]
+ @export var node_array: Array[Node]
+ [/codeblock]
+ [b]Note:[/b] Custom resources and nodes must be registered as global classes using [code]class_name[/code].
+ [b]Note:[/b] Node export is only supported in [Node]-derived classes and has a number of other limitations.
</description>
</annotation>
<annotation name="@export_category">