RichPath threadsafety

Hi,

Is it possible to calculate a RichPath on a seperate thread?

Hi

That should be possible as long as no graph updates are running at the same time.
Note that the RichPath object is essentially just a wrapper for the post processing funnel algorithm with some helpers, it is not the pathfinding itself.

Thanks!

Is there a way to check whether there are no graph updates running?

You can check

AstarPath.IsAnyWorkItemInProgress

May I ask why you need this?

We appeared to have some performance issues in some situations with RichPath.Initialize however they were mostly caused by Unity inflating the cost during deep profiling and less of an issue during normal gameplay.

1 Like