Closed dankcellar closed 5 years ago
Hey edowyney29, you should definitely be able to achieve this kind of parallelism. The reason the code breaks is because of the code in PathFinder.Debug.cs. Which updates the built-in UI. This should only happen when running your code in DEBUG mode (maybe that is something you can check in Unity). In RELEASE mode you should not have this problem.
Alternatively, if Unity doesn't care about the '[Conditional("DEBUG")]' attribute you can just throw away everything in the PathFinder.Debug.cs file and remove all reference to methods in that file. It shouldn't affect you :).
Best of luck, and let me know if this works :).
Woah, I feel a fool for not having even tried Parallel.For* with this. lol.
Hello, this library is awesome! I'm having some weird issue with getting consistent paths with the error being
IndexOutOfRangeException: Index was outside the bounds of the array.
from Unity.This will throw an error about every 10 runs and I'm almost certain it has to do with the threading. I know https://github.com/roy-t/AStar/issues/4 was an issue when it comes to threading a single find path call but I was wondering it is possible to do it the above way.
Here is the full Unity output if that helps. Thanks again for this library!