|
|
|
|
|
by jayd16
84 days ago
|
|
So if you need to conditionally tick something or you want to wait for an effect to finish, etc., you're using Update() with if() statements? The same code in a coroutine hits the same lifecycle failures as Update() anyway. You don't gain any safety by moving it to Update(). > No structured cancellation. Call StopCoroutine with the Coroutine object returned by StartCoroutine. Of course you can just pass around a cancellation token type thing as well. > Hidden allocation/GC from yield instructions. Hidden how? You're calling `new` or you're not. Instead of fighting them, you should just learn how to use coroutines. They're a lot nicer than complicated logic in Update(). |
|
Again, fine for pet projects on PC :)