- Home /
The question is answered, right answer was accepted
using coroutines for move objects - performance.
Hello all!
i watched the latest tutorial video about coroutines. i couldn't understand from the movie if using coroutines give me any performance benefits. my player is an airplane that have constant move. the movement created in update function. will i gain performance if i use coroutine for this somehow? i'm targeting the game for mobile platforms.
thanks,
Haim.
I remember reading a post awhile back (which I cannot find) that indicated that coroutines were a bit more efficient than Update() and that InvokeRepeating() was a bit more efficient than coroutines. But the differences between the three is slight.
http://forum.unity3d.com/threads/67856-Coroutines-vs-Update If this is the post you're thinking of, it shows that the Update() function is pretty significantly slower.
Answer by Fattie · Sep 22, 2013 at 07:01 AM
There's no difference. It's totally irrelevant.
the precise answer would depend on your exact project. To see any difference, you would have to carefully build a project that does the thing in question literally 1000s of times t once to try to tease out a difference. The only way to see the precise answer is to simply open the profiler (hit apple-7).
Thanks for the answer!
i thought only i can close my questions...