Getting AI to work in a randomly generated map

Hi!

I am working on a game that is randomly generated and I need my AI to be able to find the player. So I need it to navigate through all the rooms and such. But I can’t seem to get it to work. Do anyone know how I could do it?

Thanks in advance!

Hi

You would need to calculate the graph after you have generated the map, you can do this using
AstarPath.active.Scan ();

Also you might want to turn off A* Inspector -> Settings -> Scan On Awake to avoid unnecessary computations.