ReScan after resize


Is there any way to re scan the graph on game start? The graph works in scene view but then once we start the game the canvas rescaler causes the obstacles to move, and then the graph doesn’t rescan. If we press the scan button once the game has started the graph re alligns perfectly. Is there any way to write a script that will do this?

Yes, simply call;

You may also want to uncheck A* Inspector -> Settings -> Scan On Awake. Normally the graphs will be scanned during Awake, but this is probably before the canvas rescaler runs.

Usually you do not put game objects in UI space though, usually you change the camera to fit instead of changing the world to fit the camera.