Ejemplo n.º 1
0
    public IEnumerator TestCoroutine()
    {
        updateCounter = 0;
        ThreadingService.RunRoutine(CoroutineAsync());
        yield return(new WaitForSeconds(1));

        Assert.IsTrue(updateCounter == 5);
    }
Ejemplo n.º 2
0
        public async Task TestCoroutine()
        {
            updateCounter = 0;
            ThreadingService.RunRoutine(CoroutineAsync());
            await Task.Delay(5000);

            Console.WriteLine(updateCounter);
            Assert.IsTrue(updateCounter == 5);
        }