More Effective Coroutines [FREE]

More Effective Coroutines (MEC) is an improved implementation of coroutines.

When you use Unity's default coroutines you will have to be very careful about how you use them or else they will allocate memory that the garbage collector later has to clean up. This can cause your app to randomly skip frames. MEC solves that issue for coroutines, while also making coroutines more powerful by running about twice as fast as Unity's default coroutines do and providing you with a host of new options that Unity's default coroutines don't have.

This is the free version. The free version of MEC contains the mininum set of features, whereas the pro version contains the full set. Both versions run on the same super-fast core.

Switching between MEC coroutines and Unity's default coroutines is really easy. They can even be used side by side in the same project.

Advantages of MEC (both free and pro):

- MEC doesn't require that your class inherit from MonoBehavior in order to run a coroutine.
- Coroutines can be "tagged" with a string when created, allowing you to kill or pause coroutines individually or as a group.
- MEC contains no pre-compiled DLLs, which makes debugging easier.
- MEC contains useful extra segments, like SlowUpdate.
- MEC coroutines can be paused and resumed.

Limitations of free that don't exist in pro:

- The free version of MEC contains only the mininum number of timing segments. The pro version has the following additional segments: RealtimeUpdate, EditorUpdate, EditorSlowUpdate, EndOfFrame, and ManualTimeframe.
- The free version cannot run coroutines that execute in the Unity editor while your app is not running (called editor corotuines).
- In MEC free a coroutine cannot switch from one timing segment to another without starting a new coroutine.
- You cannot query whether a coroutine is running or add or remove tags to a running coroutine.
- You cannot run a singleton instance of a coroutine like you can in Pro.


For more informantion, see the documentation here.

Release Notes

3.13.0 - Removed legacy support for the wwwObject from Unity 2018 and earlier. 3.10.2 - Documentation update. 3.10.1 - Imported fluid style run functions from MEC Pro. You can now do "_MyCoroutineFunc().RunCoroutine();" instead of "Timing.RunCoroutine(_MyCoroutineFunc());" - Updated documentation. 3.08.0 - Update to make multiple instances work better. 3.07.0 - Fixed the one frame delay that would happen in some cases when nesting WaitUntilDone statements. 3.06.3 - Added additional debugging context for when MissingRefrenceExceptions appear inside a coroutine. 3.06.2 - Fixed an issue where the first coroutine that the app ran would throw an error if it used WaitUntilDone in its first frame. 3.06.1 - Fixed the one frame delay that was occuring before a coroutine that was waiting for another coroutine resumes running. - Added Timing.CurrentCoroutine, which points to the handle of the currently running coroutine function. If you're not inside a coroutine it's an invalid handle. - Fixed an issue where any coroutines that were waiting for other coroutines would start running if they were unpaused. 3.05.0 - Fixed a warning that was appearing on Unity 2018.3 and above. - Improved exception handling. - Note: Minimum supported version advanced from Unity 5.0 to Unity 5.3 3.04.1 - Fixed an issue where a coroutine could be unpaused while it was waiting for another coroutine. 3.04.0 - Timing.Instanciate has been marked as deprecated since it was never part of the API but some people thought it was. - Fixed some issues when running FixedUpdate at a low framerate. - Removed memory allocs that were occurring when running Wait functions. - Removed ResetTimeCount. - Misc efficiency improvements. 3.01.3 - When one coroutine was waiting for another coroutine there could in some cases be up to 64 frames of delay before the other coroutine started. This will no longer occur. 3.01.2 - Fixed the interaction between PauseCoroutines with no arguments and WaitForSeconds. 3.01.0 - Fixed a bug in which starting a coroutine in a different timing segment could cause WaitForSeconds to misbehave. - No longer using Debug.LogWarning, now using Assert instead since Assert typically gets removed from production builds. 3.00.1 - Some internal operations made a bit faster. - Pausing a coroutine that has called WaitForSeconds will now extend the wait time. 3.00.0 - WARNING BREAKING CHANGE: The namespace for this asset is changing from "MovementEffects" to "MEC". To upgrade, you'll have to do a find and replace in your project for MovementEffects and replace it with MEC. - Icon and associated art changed to a more "modern" style. - An overload was added to CallDelayed so you can specify a GameObject that should be checked before calling the function. 2.06.1 - Changed the way that exceptions are handled because 2017 versions of Unity no longer display the full call stack if you catch and re-throw them. - This removes the OnError delegate. Apologies if anyone was using it, but Unity's standard error reporting can be re-piped so this functionality shouldn't be essential. 2.06.0 - Added additional context help. - Unity 4.x and below frozen at this version.

Basic Information
Latest Version
3.13.0 (13 Jan 2025)
Publisher
Trinary Software
Category
Tools/Animation
Size
0.7 MB
Price
free
Asset Rating
(215)
Extended Information
Unity Versions
5.3.8, 2019.4.39, 6000.0.33
Render Pipelines
BIRP URP HDRP
State
Published