You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue description:
If two different export array variables are initialized to same value when declared,
modify one of them will affect the other unexpectedly.
I'm not sure if this is the same behavior as the doc says, although what it says is this will happen between instances using same script, not between two variables in same script. I treat it as a different problem.
exported arrays are shared between all instances. This means that editing them in one instance will cause them to change in all other instances Ref
Steps to reproduce:
Add a node2D as main scene
Attach script as follow:
extends Node2D
export(Array, int) var A = [1, 2, 3]
export(Array, int) var B = [1, 2, 3]
func _ready():
print(A)
print(B)
A[0] = 0
print(A)
print(B)
**Godot version: 3.2
**OS/device including version: Windows 10
Issue description:
If two different export array variables are initialized to same value when declared,
modify one of them will affect the other unexpectedly.
I'm not sure if this is the same behavior as the doc says, although what it says is this will happen between instances using same script, not between two variables in same script. I treat it as a different problem.
Steps to reproduce:
Minimal reproduction project:
array_bug.zip
The text was updated successfully, but these errors were encountered: