Dispatcher

FREE
Publisher Vadim Andriyanov
File size 17.66kB
Number of files 4
Latest version 1
Latest release date 2015-11-10 07:30:20
First release date 2015-10-16 06:20:20
Supported Unity versions 2018.4.2 or higher
Main thread dispatcher script.
Dispatcher's main purpose is to dispatch actions from background thread to main thread.

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;
});

Action will be executed on main thread.
Complete demo script in DispatcherTest.cs

Top Publisher Assets