[UnityTest, Order(4)] // テストの実行の優先度を指定する(昇順) public static IEnumerator _4_UniTask_UpdateWhile() => UniTask.ToCoroutine(async() => { int cnt = 0; bool flg = true; await UniTaskUtl.UpdateWhile((() => flg), () => { flg = (cnt++ < 3); Debug.Log("Update() " + Time.frameCount); }); });
[UnityTest, Order(5)] // テストの実行の優先度を指定する(昇順) public static IEnumerator _5_UniTask_UpdateForSeconds() => UniTask.ToCoroutine(async() => { await UniTaskUtl.UpdateForSeconds(0.5f, () => { Debug.Log("Update1() " + Time.frameCount); }); await UniTask.Delay(1000); await UniTaskUtl.UpdateForSeconds(1, () => { Debug.Log("Update2() " + Time.frameCount); }); });