CREATE YOUR WORLD
Scripting

Coroutine

2min

A coroutine is a non-preemptive multitasking program component that works by pausing execution and then continuing where it left off. It is mainly used to execute such features such asynchronous operations, exceptions, event loops, iterators, infinite lists, and pipes.

Click here to learn more about Unity’s coroutine.



ZEPETOScript implementation of Unity coroutines as follows.

JS


Check out the test code output screen below.

Document image