More Effective Coroutines (MEC) is a free asset on the Unity asset store. If you don’t already have it, you can get it here.
More Effective Coroutines is an improved implementation of coroutines that runs about twice as fast as Unity’s coroutines do and has zero per-frame memory allocations. It has been tested and refined extensively to maximize performance and create a rock solid platform for coroutines in your app.
Unity's Built in Coroutines | MEC Free | MEC Pro | |
---|---|---|---|
Uses the yield return structure | |||
Time taken to execute 100,000 empty coroutines | ~ 110.53ms | ~ 9.62ms | ~ 9.64ms |
Running singleton instances of coroutines | |||
Can switch the timing of coroutines mid-process | |||
CallDelayed, CallPeriodically, and CallContinously | |||
Coroutines can be either linked to a gameObject or not |
Timing Segments | Unity's Built in Coroutines | MEC Free | MEC Pro |
---|---|---|---|
Update | |||
Fixed Update | |||
Late Update | |||
Slow Update | |||
Realtime Update | |||
Editor Update | |||
Editor Slow Update | |||
End Of Frame | |||
Manual Timeframe |