SearchPath instantaneously

I thought SearchPath was a blocking function and that it will halt code exectution until the results were given, but it doesn’t seem to be the case. Is there a way to generate a path using a blocking function?

Thanks!

Hey,

https://arongranberg.com/astar/docs/path.html#BlockUntilCalculated
This is the function you’re looking for :slight_smile:

1 Like

More specifically if you are using the ai.SearchPath method you can do this:

ai.SearchPath();
seeker.GetPath().BlockUntilCalculated();
1 Like