How to connect 2D Grids?

Godot Version

4.3

Question

Hey all, I have an interesting problem I am trying to solve and I am not sure how to go about it. I have a system where there are rooms that are randomly connected, and everything navigates on a grid system. What I want is when a new room gets added to the map, I want to connect the grids from room 1 and 2, but I can’t find any good info on this.

I have tried AStarGrid2D, but that doesn’t seem to have a system to manually connect grid positions, it does it automatically.

I am now trying AStar2D, which does have code to connect grids, but doesn’t seem to be able to add points of a different AStar2D grid.

So how would I make this work? If a player wants to navigate from one grid to another, how do I connect them?