Skip to content

Provides a simple, thread safe, non monobehaviour service for managing the queue of work items on unity main thread

License

Notifications You must be signed in to change notification settings

gustavopsantos/UnityMainThreadDispatcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity Main Thread Dispatcher

Installation

Requires Unity 2019+

Install via UPM (using Git URL)

https://github.com/gustavopsantos/unitymainthreaddispatcher.git?path=/Assets/UnityMainThreadDispatcher/#1.0.0

Install manually (using .unitypackage)

  1. Download the .unitypackage from releases page.
  2. Import UnityMainThreadDispatcher.X.X.X.unitypackage

After downloading or installing by package manager, thats it, since we rely on low level player loop system, theres no need for creating a gameobject in order to hook MonoBehaviour update method

Usage

UnityMainThreadDispatcher.Dispatcher.Enqueue(() => Debug.Log("This is happening on unity main thread"));

About

Provides a simple, thread safe, non monobehaviour service for managing the queue of work items on unity main thread

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages