logoalt Hacker News

momocowcowtoday at 12:19 PM3 repliesview on HN

No serious devs even uses Unity coroutines. Terrible control flow and perf. Fine for small projects on PC.


Replies

kdheiwnstoday at 12:27 PM

In all of my years of professional game dev, I can verify that this is not even remotely true. They're used basically everywhere. They're very common when you need something to update for a set period of time but managing the state outside a very local context would just make the code a mess.

Unity's own documentation for changing scenes uses coroutines

krajzegtoday at 12:35 PM

Echoing the thoughts of the only current sibling comment: lots of "serious" developers (way to gatekeep here) definitely use coroutines, when they make sense. As mentioned, it's one of the best ways to have something update each frame for a short period of time, then neatly go away when it's not needed anymore. Very often, the tiny performance hit you take is completely outweighed by the maintanability/convenience.

show 1 reply
voidUpdatetoday at 12:43 PM

Just out of interest, how many serious unity devs have you talked to?

show 1 reply