View on Asset Store (opens in new tab)
Package details
- Latest version
- 1.1
- Last updated
- First released
- Unity version
- 2021.3.31 or later
- Package size
- 16 KB
- Files
- 5
- Favorites
- 120
- Views in the past week
- 16
Price tracking
- Last checked
- Tracked since
- Lowest recorded
- Free on
Keywords
Dispatcher
The Dispatcher class helps run actions on the main thread in Unity. It queues actions from background threads and executes them during the Update.
Affiliate link · Purchases support this site
Price history
Last 6 months
USDAsset preview
1 / 2
Dispatcher screenshot 1
About this asset
The Dispatcher class helps run actions on the main thread in Unity. It queues actions from background threads and executes them during the Update. It also limits the time spent on each action to keep the frame rate smooth.
Usage:
1) Add Empty GameObject to Scene
2) Add Component -> Dispatcher
3) Write code in background thread function:
Dispatcher.Current.BeginInvoke(() =>
{
Output.text += param;
Output.text += Environment.NewLine;
});
The action will be executed on the main thread.
Complete the demo script in DispatcherTest.cs.
From the publisher's Asset Store listing.
Compatibility
| Unity version | Built-in | URP | HDRP |
|---|---|---|---|
| 2021.3.31f1 | Compatible | Compatible | Compatible |
As listed on the Asset Store.