AstarPath.Scan over multiple frames

Hi Robin,

So here is my ScanInternal for RecastGenerator.cs http://pastebin.com/8UaNKz9Y

I pretty much just followed everything else in Aron’s update solution. But for clarity, in the AstarPath.cs here is my ScanLoop() http://pastebin.com/sZNhFqGh

finally in my application code I have something like this

… where i used to have AstarPath.active.Scan ();
now i have
StartCoroutine(Scan());


bool finishedScan = false;
IEnumerator Scan()
{
finishedScan = false;
foreach (var p in m_gameController.AStarScript.ScanLoop())
{
Debug.Log§;
yield return null;
}
finishedScan = true;
}

and I can easily check finishedScan to know the state of the scan :slight_smile:
Hopefully that helps, even if it is from 3.7.x and not 3.8.2.

Let me know how it goes,
Erin