Browse Source

Added documentation for drag-and-drop support for exported arrays (#3480)

* Added documentation for drag-and-drop support for exported arrays

* Apply suggestions from code review

Co-authored-by: Hugo Locurcio <[email protected]>

Co-authored-by: Max Hilbrunner <[email protected]>
Co-authored-by: Hugo Locurcio <[email protected]>
Eric M 5 năm trước cách đây
mục cha
commit
8ea31de5ef
1 tập tin đã thay đổi với 10 bổ sung0 xóa
  1. 10 0
      getting_started/scripting/gdscript/gdscript_exports.rst

+ 10 - 0
getting_started/scripting/gdscript/gdscript_exports.rst

@@ -163,6 +163,10 @@ between all instances. This means that editing them in one instance will
 cause them to change in all other instances. Exported arrays can have
 initializers, but they must be constant expressions.
 
+If the exported array specifies a type which inherits from Resource, the array
+values can be set in the inspector by dragging and dropping multiple files 
+from the FileSystem dock at once.
+
 ::
 
     # Exported array, shared between all instances.
@@ -181,6 +185,12 @@ initializers, but they must be constant expressions.
     export(Array) var b
     export(Array, PackedScene) var scenes
 
+    # Arrays with specified types which inherit from resource can be set by
+    # drag-and-dropping multiple files from the FileSystem dock.
+
+    export(Array, Texture) var textures
+    export(Array, PackedScene) var scenes
+
     # Typed arrays also work, only initialized empty:
 
     export var vector3s = PackedVector3Array()