Install Asset
Install via Godot
To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser
Quick Information
This asset provides Unity-style IEnumerator coroutines with zero per-frame garbage generation.
Description
This is a partial port of the MEC Free asset for Godot 4.x .NET published with permission under the MIT license.
Original source by Teal Rogers at Trinary Software.
Installation
- Download Latest commit or the stable Release version.
- Place the
addonsfolder into your project root. - Build the project solution under
MSBuild > Build > Build Project
Usage
Documentation for the original Unity asset may be found here. Usage is largely unchanged, aside from changes to the naming conventions.
Example Coroutine
public override void _Ready()
{
Timing.RunCoroutine(DestroyAfter(2));
}
IEnumerator<double> DestroyAfter(double seconds)
{
yield return Timing.WaitForSeconds(seconds);
GD.Print("Goodbye!");
QueueFree();
}
Notable Differences
Doubles
Godot uses double for its scalars, so coroutines return IEnumerator<double>.
Naming
Names have been changed to match Godot terminology, most notably:
Update->ProcessGameObject->Node
Execution order
To avoid ambiguous execution order at runtime depending on the tree layout, all Timing instances start with a ProcessPriority and ProcessPhysicsPriority of -1. This means coroutines will update before regular nodes by default.
Contribution
If you spot a bug while using this, please create an Issue.
License
Copyright (c) 2023-present, Teal Rogers, Isar Arason (WeaverDev)
This asset provides Unity-style IEnumerator coroutines with zero per-frame garbage generation.
Reviews
Quick Information
This asset provides Unity-style IEnumerator coroutines with zero per-frame garbage generation.