Saturday 21 February 2015

[Unity3D] Starting & stopping coroutines

Recently I was figuring out how start and stop coroutine works in Unity. And here you can find what I find out.



First things first.

What are those "Coroutines"?


They are almost same as functions but you can program them to work over time.
For example: if you'd like to tween a button or fade out any object over time you'll be able to do that only with coroutines (or very complex and strange Update... ;) ) because they are not limited to single frame like normal functions.

If you are looking for better explanation what coroutines are you can find it on the end of the post.. ;)