Hi, I’m writing some procedural terrain generation code, so far I’ve split my world into chunks and spread the generation of chunks across frames by using coroutines, specifically 5 chunks for each frame. When I looked at the profiler I noticed something strange.
From the profiler, we can see that the chunk generation job takes 0.157 ms to complete, and there are 5 of them. However, the whole Coroutine.MoveNext takes a staggering 7.17 ms! That’s way more than the time 5 jobs take combined. From the timeline it’s clearly visible that there are huge gaps between each job iteration. Why is that the case? And how can I optimise it more?
Thanks in advance for any ideas and suggestions!

