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
I can confirm it also happens with Dictionary, and i assume it happens with all other variants of PackedXXXArray EDIT NOTE: still happening on godot 4.0 beta 6
func _ready() -> void:
var dic = {
c = randi(),
d = randi()
}
var dic2 = Dictionary(dic)
print(dic, dic2)
__(dic)
print(dic, dic2)
breakpoint
var arr = [1, 2, 3]
var arr2 = Array(arr)
print(arr, arr2)
___(arr2)
print(arr, arr2)
breakpoint
func ___(arg):
arg.push_back(randi())
arg.push_back(randi())
func __(arg):
arg["a"] = randi()
arg["b"] = randi()
The documentation is wrong. Correct one is in Dictionary for some reason:
Returns the same array as [param from]. If you need a copy of the array, use [method duplicate].
The method Array(array) is useless much for gdscript, but you cannot simply change that constructor in core codebase to make a copy because it is used in some parts of codebase to get variant for an array.
Godot version
4.0.dev (28174d5)
System information
5.15.2-2-MANJARO
Issue description
However, that is not the case.
Steps to reproduce
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: