mirror of
https://github.com/Cysharp/UniTask.git
synced 2026-05-27 02:40:08 +00:00
ReadMe
This commit is contained in:
@@ -197,7 +197,7 @@ namespace Cysharp.Threading.TasksTests
|
||||
//await UniTask.SwitchToThreadPool();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -369,6 +369,24 @@ namespace Cysharp.Threading.TasksTests
|
||||
throw new Exception("MyException");
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator NextFrame1() => UniTask.ToCoroutine(async () =>
|
||||
{
|
||||
await UniTask.Yield(PlayerLoopTiming.LastUpdate);
|
||||
var frame = Time.frameCount;
|
||||
await UniTask.NextFrame();
|
||||
Time.frameCount.Should().Be(frame + 1);
|
||||
});
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator NextFrame2() => UniTask.ToCoroutine(async () =>
|
||||
{
|
||||
await UniTask.Yield(PlayerLoopTiming.PreUpdate);
|
||||
var frame = Time.frameCount;
|
||||
await UniTask.NextFrame();
|
||||
Time.frameCount.Should().Be(frame + 1);
|
||||
});
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator NestedEnumerator() => UniTask.ToCoroutine(async () =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user