Skip to content

Commit

Permalink
Il2Cpp: Add MonoBehaviour.StartCoroutine extension with managed IEnum…
Browse files Browse the repository at this point in the history
…erator
  • Loading branch information
ghorsington committed Nov 4, 2021
1 parent 32d1be5 commit 4530c98
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions BepInEx.IL2CPP/Utils/MonoBehaviourExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System.Collections;
using BepInEx.IL2CPP.Utils.Collections;
using UnityEngine;

namespace BepInEx.IL2CPP.Utils
{
public static class MonoBehaviourExtensions
{
public static Coroutine StartCoroutine(this MonoBehaviour self, IEnumerator coroutine)
{
return self.StartCoroutine(coroutine.WrapToIl2Cpp());
}
}
}

0 comments on commit 4530c98

Please sign in to comment.