Coroutines or Async/Await in Unity: Which and When
Both run code over several frames, and both can bite you. Here is when we reach for coroutines, when async/await is the better tool, and how to avoid the lifetime bug that catches most teams.

For Unity coroutines vs async await, a simple rule works: use coroutines for gameplay sequences tied to one GameObject, and async/await for work that returns a value, such as loading, saving or network calls. Coroutines stop when their object is deactivated or destroyed. Async methods keep running unless you cancel them, which is the main trap.
The quick comparison
| Coroutines | Async/await | |
|---|---|---|
| Lives on | A MonoBehaviour | Any C# method |
| Stops when object is disabled | Yes, if the GameObject is deactivated | No, unless cancelled |
| Returns a value | Not directly | Yes |
| Error handling | Logs and stops | try/catch works normally |
| Waiting on frames | yield return null | await Awaitable.NextFrameAsync() in Unity 6 |
| Best for | Timed gameplay sequences | Loading, saving, web requests |
Both run on the main thread by default. Neither makes code faster on its own; they only spread work across time.
Where coroutines still win
Coroutines are simple and their lifetime is automatic. A sequence that belongs to one object dies with that object, which is usually what you want.
Good fits:
- Flashing a sprite when hit
- A short spawn sequence or a countdown
- Tweening a value over a second
- Any timed effect that should vanish if the object does
One detail worth knowing: deactivating the GameObject stops its coroutines, but setting the component's enabled to false does not. If an effect keeps running on a disabled component, that is why.
Cache your wait objects. new WaitForSeconds(0.5f) allocates each time, so store it in a field if the coroutine runs often.
Where async/await is the better tool
Async/await shines when work produces a result or chains several steps. The code reads top to bottom, and try/catch works as you expect.
Good fits:
- Loading a save file and returning the data
- Web requests and backend calls
- Chained loading steps, such as config then assets then scene
- Anything shared by non-MonoBehaviour classes
Our save system guide uses this pattern for loading and writing saves without blocking the frame.
The lifetime trap
An async method keeps running after its object is destroyed. If a player leaves a scene while an await is pending, the method resumes later and touches an object that no longer exists.
Since Unity 2022.2, every MonoBehaviour has destroyCancellationToken. Pass it into your awaits and the method stops cleanly when the object goes away.
async void Start()
{
try
{
await Awaitable.WaitForSecondsAsync(2f, destroyCancellationToken);
ShowTip();
}
catch (OperationCanceledException) { }
}
The Awaitable class arrived in Unity 2023.1, which became Unity 6. On older versions, pass the token into your own methods and check it after each await.
Every await inside a MonoBehaviour should take a cancellation token. Make it a habit and the most common async bug disappears.
Awaitable, Task and allocations
On Unity 6, prefer Awaitable for frame-based waits. It has NextFrameAsync, WaitForSecondsAsync, EndOfFrameAsync, and BackgroundThreadAsync with MainThreadAsync for moving heavy work off the main thread and back.
Awaitable objects are pooled to cut garbage, so await each one only once. Standard Task works in Unity too, but it allocates more, which matters in hot paths on mobile.
Many teams use the open-source UniTask library for low-allocation async on older Unity versions. It is a solid option, though on Unity 6 you may not need it.
Errors and debugging
Coroutines log an exception and stop, which is easy to spot. Async methods behave differently depending on how they are called.
- async void methods log exceptions to the Console in Unity, so you will see them.
- async Task methods nobody awaits can fail quietly, because the exception sits inside the task.
- Background thread code cannot touch most Unity APIs, so switch back with
MainThreadAsyncbefore using them.
Keep async void for Unity event methods like Start, and return Task or Awaitable everywhere else so callers can await and catch errors.
A simple rule set for a project
Teams argue less when the rules are written down, and a mixed codebase stays readable when everyone follows the same split. New people can tell at a glance whether a method is a gameplay sequence or a piece of loading work.
This is the set we use:
- Gameplay timing on one object: coroutine.
- Anything that returns data or calls out to disk or network: async.
- Every await in a MonoBehaviour takes
destroyCancellationToken. - No fire-and-forget Tasks without a try/catch.
- Profile on a real phone if a coroutine or async loop runs every frame.
What we would do
We would keep coroutines for small visual and gameplay sequences and move all loading, saving and network code to async with cancellation tokens. On Unity 6 we would use Awaitable and skip extra libraries unless profiling showed a need.
Then we would add the rule set to the project readme, so anyone joining later follows the same pattern.
The short version
- Coroutines for timed gameplay on one object, async for work that returns data.
- Coroutines stop when the GameObject deactivates; async does not.
- Pass
destroyCancellationTokeninto every await in a MonoBehaviour. - Use Awaitable on Unity 6 and await each one only once.
- Return Task or Awaitable, not void, outside Unity event methods.
If your project has async code that keeps throwing after scene changes, we are happy to take a look.
Related reading: Scriptable Objects for game config, Unity packages worth importing, Unity object pooling for mobile stutter
Got a game idea? We build it.
You bring the concept. We design, build, test and launch it, and you own 100% of the finished game.
Share Your Game Idea →