Godot v3.3.1.stable.mono.official
I am trying to draw a CollisionPolygon2D programmatically but I cannot resize or write the PoolVector2Array property called polygon:
extends CollisionPolygon2D func _ready() -> void: polygon.resize(1) print(polygon.size()) polygon[0] = Vector2.ZERO This code prints 0 and throws an error: Invalid set index '0' (on base: 'PoolVector2Array') with value of type 'Vector2'.