UniTask & Related things
This article explains what UniTask is and why it is widely used in Unity. It describes how UniTask, made by Cysharp, is designed to replace IEnumerator + StartCoroutine, standard async Task, and older callback patterns. The post compares the main problems of traditional Unity coroutines and .NET Task in Unity, especially poor control, no proper cancellation, missing return values, and heavy GC allocations. It then shows how UniTask solves these issues with zero-allocation async/await, awaitable Unity workflows such as scene loading, animation, frame waiting, and DOTween, plus support for CancellationToken and real multithreading. The article also reviews alternatives like pure Coroutine, async Task, and third-party promise libraries, and concludes with practical cases where UniTask is useful in real games and why many Unity studios rely on it.