Hi, I wanted to report a bug in Multithreading, when we use AstarPath.active.ScanAsync();
In my case, I use the Raycast graph; the update makes the Agents locate in different parts of the grid. This sudden change is so obvious, for example, sometimes my enemy moves 20 meters away suddenly after I scan the graph. A* Pro 5.3.8. Unity 6000.2.
Thanks for the info! I’m gonna tag Aron for more development help but I wanna follow up with a few questions for clarity:
- So you said this is with Multithreading/
ScanASync()- does this happen withScan()too? - When you say multithreading I’m assuming you have your thread count in the Astar settings set to…well, multiple😄If you switch to one, the default, do you still see this issue?
Since this is labeled as it specifically being a bug in multithreading, I’m mainly looking for clarity on if this is an issue with ScanASync()with multithreading, or scanning in general with multithreading
Hi
If the agent’s jump around, that typically means that the position where the agents were before are no longer walkable. Is that the case for you?
Hi, No, I don’t think so. What does that mean, no longer walkable? My enemy is in the blue graph, and it’s coming toward my character, but suddenly it moves to another point, and actually, my walkable or non-walkable makes no difference at that position. (I can just skip and not run it, but I’m doing a test for another part.)
The thing is, I have a couple of hallways that intersect with each other, and I need to scan them in runtime. I know that there are other ways, like scanning only a bounds area, but I wanted to scan the whole graph, which is made up of 7 raycast graphs, each for an aisle, but even when I run a SyncScan on the hallway, that does not change; this glitching is happening.
I’m not even sure this issue comes from multithreading.
Is there any way to visualize the graph without clicking on scan? I want to see the graph that is generated by runtime, but it won’t show gizmos until I click on scan graph manually. (Is there any button to show that I’m unaware?)
Another interesting point that I found is that scanSync has more issues than scan alone.
Sorry, I’m not clear. I can’t understand where the issue comes from; it just moves my agent in a walkable blue graph, and it always goes back. I can record a video if you want to? And the script is so simple, it just does Astra.active.syncScan();
I have to test the Scanning with bounds to see if that works
With more testing that I do, it seems like it’s not related to multithreading, cause it happens even when I set it to none.
I will record a video tomorrow to show what is happening.


