Browse Source

Update gdscript_exports.rst

Remove bogus information.
Just tested it. No form of declaration causes an array to be shared across instances.

Godot 3.2.2
Manuel 'TheDuriel' Fischer 5 years ago
parent
commit
a5f313fbe6
1 changed files with 1 additions and 7 deletions
  1. 1 7
      getting_started/scripting/gdscript/gdscript_exports.rst

+ 1 - 7
getting_started/scripting/gdscript/gdscript_exports.rst

@@ -165,11 +165,7 @@ If in doubt, use boolean variables instead.
 Exporting arrays
 Exporting arrays
 ----------------
 ----------------
 
 
-Exporting arrays works, but with an important caveat: while regular
-arrays are created local to every class instance, exported arrays are *shared*
-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.
+Exported arrays can have initializers, but they must be constant expressions.
 
 
 If the exported array specifies a type which inherits from Resource, the array
 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
 values can be set in the inspector by dragging and dropping multiple files
@@ -177,7 +173,6 @@ from the FileSystem dock at once.
 
 
 ::
 ::
 
 
-    # Exported array, shared between all instances.
     # Default value must be a constant expression.
     # Default value must be a constant expression.
 
 
     export var a = [1, 2, 3]
     export var a = [1, 2, 3]
@@ -204,7 +199,6 @@ from the FileSystem dock at once.
     export var vector3s = PackedVector3Array()
     export var vector3s = PackedVector3Array()
     export var strings = PackedStringArray()
     export var strings = PackedStringArray()
 
 
-    # Regular array, created local for every instance.
     # Default value can include run-time values, but can't
     # Default value can include run-time values, but can't
     # be exported.
     # be exported.