While Loop

Al Heck
Aug 10, 2021

These are easy to read and often used in coroutine. To set them up, add the while is true and then inside, add the routine inside. Then be sure to run the coroutine.

It’s bad practice to put these in with no way to stop since we can’t slow down the process. All of the memory will be consumed so be sure to always use them inside a coroutine.

You can run a while loop with an incrementor similar to a for loop so it knows when to stop.

--

--

Al Heck

Unity Developer and Software Engineer who loves making games with GameDevHQ