Incremental garbage collection when scanning graphs asynchronously

Hi,

I’m using version 4.3.29, and I’m getting a pretty huge GC spike (100+ ms) when attempting to scan a GridGraph asynchronously at runtime. I looked at the source code for AstarPath and noticed that you call System.GC.Collect() directly after a scan is complete.

Would it be possible for you to instead perform incremental GC over several frames via Unity’s GarbageCollector.CollectIncremental() in Unity versions 2019.1 or higher when scanning graphs asynchronously?

Thanks!