Merge pull request #338 from simonkellly/coroutines

Support returning Il2Cpp IEnumerators which had been compiler generated
This commit is contained in:
Geoffrey Horsington authored and GitHub committed 2021-11-19 23:05:45 +02:00
commit 8e9f1f3592
1 file changed
+1
@@ -35,6 +35,7 @@ namespace BepInEx.IL2CPP.Utils.Collections
public Object Current => enumerator.Current switch
{
Il2CppIEnumerator i => i.Cast<Object>(),
IEnumerator e => new Il2CppManagedEnumerator(e),
Object oo => oo,
{ } obj => ManagedToIl2CppObject(obj),