IEnumerator LuaCoroutine(LuaThread thread) { thread = thread.Retain(); runningCoroutines.Add(thread); while (thread.Resume()) { if (thread.hasYields) { yield return(thread.current[1]); } yield return(null); } runningCoroutines.Remove(thread); thread.Dispose(); }
public void StartLuaCoroutine(LuaThread thread) { StartCoroutine(LuaCoroutine(thread)); }