Skip to content

Commit 4530c98

Browse files
committed
Il2Cpp: Add MonoBehaviour.StartCoroutine extension with managed IEnumerator
1 parent 32d1be5 commit 4530c98

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System.Collections;
2+
using BepInEx.IL2CPP.Utils.Collections;
3+
using UnityEngine;
4+
5+
namespace BepInEx.IL2CPP.Utils
6+
{
7+
public static class MonoBehaviourExtensions
8+
{
9+
public static Coroutine StartCoroutine(this MonoBehaviour self, IEnumerator coroutine)
10+
{
11+
return self.StartCoroutine(coroutine.WrapToIl2Cpp());
12+
}
13+
}
14+
}

0 commit comments

Comments
 (0)