Apparently the doc still doesn't show default constructors like I raised here https://github.com/godotengine/godot/issues/6977
In Godot 2.1, Vector2Array
is created like this:
var a = Vector2Array()
a.append(Vector2(1,2))
It can also be created from a dynamic array, like the doc said shows:
var a = Vector2Array([ Vector2(1,1), Vector2(2, 2), Vector2(3,3) ])
Note: in Godot 3.0 Vector2Array
has been renamed PoolVector2Array
.