Skip to content

Commit

Permalink
Document new feature allowing @exported Arrays to set property hint…
Browse files Browse the repository at this point in the history
…s for their elements (#9061)

* Document export variations for arrays

* Update tutorials/scripting/gdscript/gdscript_exports.rst

Co-authored-by: Raul Santos <raulsntos@gmail.com>

---------

Co-authored-by: Max Hilbrunner <mhilbrunner@users.noreply.github.com>
Co-authored-by: Raul Santos <raulsntos@gmail.com>
  • Loading branch information
3 people committed Mar 25, 2024
1 parent 9840c45 commit bd7bc61
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tutorials/scripting/gdscript/gdscript_exports.rst
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,15 @@ Packed type arrays also work, but only initialized empty:
@export var vector3s = PackedVector3Array()
@export var strings = PackedStringArray()

Other export variants can also be used when exporting arrays:

::

@export_range(-360, 360, 0.001, "radians") var laser_angles: Array[float] = []
@export_file("*.json") var skill_trees: Array[String] = []
@export_color_no_alpha var hair_colors = PackedColorArray()
@export_enum("Espresso", "Mocha", "Latte", "Capuccino") var barista_suggestions: Array[String] = []

``@export_storage``
-------------------

Expand Down

0 comments on commit bd7bc61

Please sign in to comment.