浏览代码

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 年之前
父节点
当前提交
8ea31de5ef
共有 1 个文件被更改,包括 10 次插入0 次删除
  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
 cause them to change in all other instances. Exported arrays can have
 initializers, but they must be constant expressions.
 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.
     # Exported array, shared between all instances.
@@ -181,6 +185,12 @@ initializers, but they must be constant expressions.
     export(Array) var b
     export(Array) var b
     export(Array, PackedScene) var scenes
     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:
     # Typed arrays also work, only initialized empty:
 
 
     export var vector3s = PackedVector3Array()
     export var vector3s = PackedVector3Array()