private bool CheckYield()
{
var obj = RoutineInner.Current;
if (obj == null)
{
// TODO handled specially when obj is null
// nullYieldInstruction
// dispatch next frame
//LogUtils.Debug("Coroutine.Yield WaitForTicks(1)");
Yield(new WaitForTicks(1));
// CoroutineManager.Remove(this)
return true;
}
var yieldInstruction = obj as IYieldInstruction;
if (yieldInstruction == null)
{
throw new Exception();
}
//LogUtils.Debug("Coroutine.Yield");
Yield(yieldInstruction);
return true;
}
private bool NextStep()