I tried use Array
with its duplicate
method which has deep
as parameter. So, It hadn't worked. Now, I don't quite understand what this argument does. By the way, I have been testing with this code:
func _ready():
var astar = AStar2D.new() # object to duplicate
var t = [astar] # creating array with it
var g = t.duplicate(true) # "duplicating"
g[0].add_point(6, Vector2(1, 1)) # changing new object
print(astar.get_points()) # Definitely, astar hadn't changed. No.
Regretfully, output isn't an empty array.