I’m proceudrally generating a level. After I generate my map. I would call the Scan function by doing the following code:
AstarPath.active.Scan();
It works on the first iteration. I have a feature where if I press the F2 button, it will regenerate the map. After I regenerate the map, I will call the Scan function again. But it doesn’t work. There are different color tiles (which indicates that the 2 area are not connected) but there I found that there is a path from 1 side of the color tile to the other. I have to manually click on the Scan button on the Inspector, then it will rescan it and this time it will render the 2 area as 1 color.
Not sure what might be causing the issue. Is it because I am calling the Scan function immediatley after generating my map?