ScanLoop() is not looping, it's the same as Scan() and it's locking the main thread

One would think ScanLoop() would run as a Coroutine, so it would make sense to get the callback messages and all. But it runs entirely in one frame, which makes it slow and the whole OnScanStatus calls completely useless, since they all get called on the same 500ms frame…

I had already noticed something strange in my loading screen, where it would not increase progress during path-finding scan, but paid no attention to it. Now I’m needing to update the graph eventually while the game is running, but I get a huge hick-up if I try to use ScanLoop()

There’s a comment on top which states “This is a IEnumerable, …”, which is false, there’s no yielding in the ScanLoop method. There’s currently zero difference between ScanLoop() and Scan().

Bump. @aron_granberg - any thoughts on this?

Ah. That comment is just something I have forgot to remove. It was once a coroutine.
The ScanLoop method is used internally by the editor to display the progress bar. You are right in that it is completely blocking.

I am thinking about rewriting it to be optionally non-blocking since a lot of users have requested it.
You can find some discussion (and code) about it here: WebGL builds and unresponsive javscript