Home › AI Game Development › UniTask
What is UniTask? allocation-free async/await for Unity
UniTask provides an efficient, allocation-free async/await integration for Unity. If your Unity code is full of coroutines and callbacks, UniTask lets you write it as plain async code — with zero allocation and no threads.
UniTask in one paragraph
UniTask (github.com/Cysharp/UniTask) replaces Unity coroutines with a struct-based UniTask<T> and a custom async method builder, so awaiting something in Unity allocates nothing. It makes every Unity AsyncOperation and coroutine awaitable, and it runs completely on Unity’s PlayerLoop, so it uses no threads and works on WebGL and WebAssembly. It has been going since May 2019, passed 11,300 GitHub stars by December 2026, and is still maintained — its most recent push at the time of writing was October 2026.
It is released under the MIT licence, so anyone can use it in a free or commercial Unity game. You install it as a UPM package from a git URL or as a .unitypackage from the releases page, and the README documents the whole API — cancellation, timeouts, progress, the PlayerLoop, async LINQ, channels, and how it compares with the standard Task API. There is also a Chinese-language README in the repo.
What UniTask actually does
UniTask’s job is to make async code in Unity fast, safe and easy to read.
1. Zero-allocation async
A struct-based UniTask<T> and a custom AsyncMethodBuilder achieve zero allocation for the common async paths. It runs completely on Unity’s PlayerLoop, so it does not use threads — which is exactly why it works on WebGL and WebAssembly, where threads are not available.
2. Makes Unity itself awaitable
All Unity AsyncOperations and coroutines become awaitable, and so do MonoBehaviour message events and uGUI events. PlayerLoop-based tasks — UniTask.Yield, UniTask.Delay, UniTask.DelayFrame — let you replace every coroutine operation with an await, including loading a scene or downloading a file with UnityWebRequest.
3. Async LINQ, channels and reactive values
Asynchronous LINQ, a Channel type and AsyncReactiveProperty come with it, so you can write async data pipelines and reactive UI state in the same style as the rest of your async code, instead of bolting on a second system.
4. Safety tooling included
A TaskTracker window helps prevent memory leaks from forgotten tasks, cancellation is handled with WithCancellation and per-GameObject tokens, and the behaviour is highly compatible with Task, ValueTask and IValueTaskSource, so existing .NET async knowledge transfers directly.
Download and setup
Install via UPM with the git URL https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask — that needs a Unity version supporting path query parameters for git packages (Unity 2019.3.4f1 or later, or 2020.1a21 or later). Or download a UniTask.*.*.*.unitypackage from the releases page and import it. Then add using Cysharp.Threading.Tasks; and start writing async UniTask methods.
What it costs
UniTask itself is free — MIT licensed, no subscription, no per-game fee. The only costs are the ones around it: your Unity licence, on Unity’s own terms, and your development time. There is nothing to buy from the project itself.
Who UniTask is for
Unity developers drowning in coroutines
If your codebase is a maze of StartCoroutine and yield return, UniTask lets you write the same logic as readable async code — with no allocations to show up in the profiler.
WebGL and WebAssembly developers
Threads are not available on WebGL, and UniTask does not use them. It runs on the PlayerLoop, so the same async code works in the browser build as on desktop.
Teams loading assets and scenes async
Scene loads, asset loads and web requests are all awaitable, with cancellation tied to a GameObject’s lifetime — so a destroyed object cancels its own work instead of crashing.
Developers who care about allocations
Zero-allocation async means the garbage collector stays quiet during gameplay. The README even documents how to check allocations in the profiler.
UniTask at a glance
- Project: Cysharp/UniTask — “Provides an efficient allocation free async/await integration for Unity.”
- Licence: MIT — free and open source, commercial use allowed
- Popularity: over 11,300 GitHub stars by December 2026 (created May 2019)
- Language: C#
- Requirements: Unity 2019.3.4f1+ (or 2020.1a21+) for the UPM git URL install
- Runs on: Unity’s PlayerLoop — no threads, so it works on WebGL and WebAssembly
- Install: UPM git URL or
.unitypackagefrom the releases page
Honest limits
UniTask is a code library, not a game — you write the C#, it only makes the async parts clean. It does not use threads, so work that genuinely needs a thread pool has limits the README documents in its own ThreadPool section, and there is a documented limitation on converting IEnumerator to UniTask. It is Unity-only: if your game is not in Unity, UniTask does not apply.
Want a game without doing the setup?
UniTask is the kind of proven Unity tooling our AI game development service builds with: clean async code, no coroutine spaghetti, and everything playtested by hand. Mini-games from £499, full 2D games from £1,499, 3D games from £2,999. You bring the idea; we do the build.
Have a game idea?
Tell us the idea — a sentence is enough. We will tell you what it takes and what it costs, honestly.