C# Class UnityMainThreadDispatcher, OpenFace-FACS-Unity-Facial-Animator

A thread-safe class which holds a queue with actions to execute on the next Update() method. It can be used to make calls to the main thread for things such as UI Manipulation in Unity. It was developed for use in combination with the Firebase Unity plugin, which uses separate threads for event handling Adapter from here: https://github.com/PimDeWitte/UnityMainThreadDispatcher
Inheritance: MonoBehaviour
Afficher le fichier Open project: alexismorin/OpenFace-FACS-Unity-Facial-Animator Class Usage Examples

Méthodes publiques

Méthode Description
Enqueue ( Action, action ) : void

Locks the queue and adds the Action to the queue

Enqueue ( IEnumerator, action ) : void

Locks the queue and adds the IEnumerator to the queue

Exists ( ) : bool
Instance ( ) : UnityMainThreadDispatcher,
Update ( ) : void

Private Methods

Méthode Description
ActionWrapper ( Action, a ) : IEnumerator,
Awake ( ) : void
OnDestroy ( ) : void

Method Details

Enqueue() public méthode

Locks the queue and adds the Action to the queue
public Enqueue ( Action, action ) : void
action Action, function that will be executed from the main thread.
Résultat void

Enqueue() public méthode

Locks the queue and adds the IEnumerator to the queue
public Enqueue ( IEnumerator, action ) : void
action IEnumerator, IEnumerator function that will be executed from the main thread.
Résultat void

Exists() public static méthode

public static Exists ( ) : bool
Résultat bool

Instance() public static méthode

public static Instance ( ) : UnityMainThreadDispatcher,
Résultat UnityMainThreadDispatcher,

Update() public méthode

public Update ( ) : void
Résultat void