Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Distribute work across threads

Suspend or move work off the main thread so that expensive operations don't block frame updates.
Read time 1 minuteLast updated a day ago

Unity provides different options for work that you don't want to run inline on the main thread. The job system schedules small units of work across worker threads to use all available CPU cores. The
Awaitable
class integrates C#
async
and
await
with Unity's frame loop, letting a method suspend and resume without blocking the main thread.

Topic

Description

Write multithreaded code with the job systemUse Unity's job system to get the most out of multi-core CPUs and parallelize your algorithms.
Asynchronous programming with the Awaitable classAsynchronous programming in Unity with the .NET
async
and
await
keywords and Unity's own custom
Awaitable
class.

Additional resources