Skip to content

Commit bd7bc61

Browse files
AbelToymhilbrunnerraulsntos
authored
Document new feature allowing @exported Arrays to set property hints for their elements (#9061)
* Document export variations for arrays * Update tutorials/scripting/gdscript/gdscript_exports.rst Co-authored-by: Raul Santos <[email protected]> --------- Co-authored-by: Max Hilbrunner <[email protected]> Co-authored-by: Raul Santos <[email protected]>
1 parent 9840c45 commit bd7bc61

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tutorials/scripting/gdscript/gdscript_exports.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,15 @@ Packed type arrays also work, but only initialized empty:
368368
@export var vector3s = PackedVector3Array()
369369
@export var strings = PackedStringArray()
370370

371+
Other export variants can also be used when exporting arrays:
372+
373+
::
374+
375+
@export_range(-360, 360, 0.001, "radians") var laser_angles: Array[float] = []
376+
@export_file("*.json") var skill_trees: Array[String] = []
377+
@export_color_no_alpha var hair_colors = PackedColorArray()
378+
@export_enum("Espresso", "Mocha", "Latte", "Capuccino") var barista_suggestions: Array[String] = []
379+
371380
``@export_storage``
372381
-------------------
373382

0 commit comments

Comments
 (0)