mirror of https://github.com/Cysharp/UniTask
fix broken loop-runner from 2.0.32, #172
parent
2bf9f4f062
commit
5d4a90e9bd
|
@ -143,8 +143,6 @@ namespace Cysharp.Threading.Tasks.Internal
|
||||||
{
|
{
|
||||||
var j = tail - 1;
|
var j = tail - 1;
|
||||||
|
|
||||||
var loopItems = this.loopItems;
|
|
||||||
// eliminate array-bound check for i
|
|
||||||
for (int i = 0; i < loopItems.Length; i++)
|
for (int i = 0; i < loopItems.Length; i++)
|
||||||
{
|
{
|
||||||
var action = loopItems[i];
|
var action = loopItems[i];
|
||||||
|
|
|
@ -200,5 +200,16 @@ namespace Cysharp.Threading.TasksTests
|
||||||
okay1.Should().Be(true);
|
okay1.Should().Be(true);
|
||||||
okay2.Should().Be(true);
|
okay2.Should().Be(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
[UnityTest]
|
||||||
|
public IEnumerator LoopTest() => UniTask.ToCoroutine(async () =>
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 20; ++i)
|
||||||
|
{
|
||||||
|
UniTask.DelayFrame(100).Forget();
|
||||||
|
await UniTask.DelayFrame(1);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue