Instant Path Results

Hi,

Is there a function which can be called which will return you a usable path back instantly? (or if it gives you a callback before the function returns, that would also be ok)

Thanks.

Sure, just call AstarPath.WaitForPath (yourpath);

Path p = seeker.StartPath(...) or similar AstarPath.WaitForPath (p); // Now it is calculated! Any callbacks will have been called

You can also use
IEnumerator Blah () { Path p = seeker.StartPath(...) or similar yield return StartCoroutine (p.WaitForPath()); // Now it is calculated, but a few frames later }

Note that other paths in the path queue before this path will also be calculated when doing this.