Updating grid in runtime

i want to update the grid every about 2 seconds
problem is asyncscan doesnt work

private IEnumerator Rescan()
    {
        //print("RRR");
        while (true)
        {
            var prevTime = Time.time;
            print("aaa");
            yield return AP.ScanAsync();
            //print("aaa");
            yield return new WaitForSeconds(1);
        }
        
    }

and scan even in a async method blocks the process

 private IEnumerator Rescan()
    {
        //print("RRR");
        while (true)
        {
            var prevTime = Time.time;
            AP.Scan();
            //print("aaa");
            yield return new WaitForSeconds(1);
        }
        
    }

its driving me crazy right now

Hi

What do you mean by “doesn’t work”?

Note that if you want to make smaller graph updates, take a look at https://arongranberg.com/astar/docs/graph-updates.php