Calculate a path without following it

Hello, does anyone know how to calculate a path without having the unit follow it, and then calculate the distance of that path? I want to be able to calculate the walking distance from one unit to another so that the AI can decide whether or not to follow the enemy.

Hi

You can use the AstarPath.StartPath method instead of the seeker. The seeker internally uses the AstarPath.StartPath method, but any script can use it if you don’t have a specific agent that it is meant for. It will not do any fancy post processing of the path however, but if you need it, there is a method in the Seeker component to do post processing on an already calculated path.