Hi I'm trying to use autotile in Godot 4, I discovered that is now in the terrain tab and I did manage to use it in the editor but in code I cant make any progress.
This a simplified example of what I'm trying to do:
for x in range(5):
for y in range(5):
tilemap.set_cell(0, cord, 0, Vector2(x, y), 1)
tilemap.set_cells_from_surrounding_terrains(0, tilemap.get_used_cells(0), 0)