IEnumerator Notes on the underlying implementation of C# generators (which are used in Unity for coroutines). You can use SharpLab to view the decompiled C# from a simple generator, to help understand the transformation that is happening. Both .NET and Mono do seem to use the same compiler transformation when turning Generators into anonymous IEnumerator classes.