Unity async / await: Coroutine's Hot Sister [C# & Unity]
Video Statistics and Information
Channel: Tarodev
Views: 38,645
Rating: undefined out of 5
Keywords: tarodev, unity, tutorial, c#, async await, await, multithreading, task, coroutine, sequential, synchronous, rotate object, return data from task, game development
Id: WY-mk-ZGAq8
Channel Id: undefined
Length: 16min 18sec (978 seconds)
Published: Sat Oct 09 2021
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.
Replace Task with UniTask. UniTask is a struct based Task that has next to no allocations and a bunch of phenomenal utilities.
https://github.com/Cysharp/UniTask
Nice topic, wasn't aware of it!
Next: That just motivated me to finally take a few minutes to learn/understand how to also use jobs and burst (to go beyond the main thread), without necessarily using ECS, i.e. the whole DOTS (w/ Entities.ForEach, etc).
Great video and really funny because I just yesterday implemented the "start a bunch of coroutines and count them and subtract from the counter in the callback and check the counter until it's 0" pattern and he's right.. it's a crappy way to work!
Will consider this a strong message to finally stop using coroutines.
Iβm glad I learned about these coding discord bots before I learned about the mess that is unity coroutines, saved me some headaches
Yeah itβs great, though I wish it could just take care of killing itself when itβs object dies. Would make it way simpler to code and closer to Coroutines in that aspect