C# Класс 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
Наследование: MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
ActionWrapper ( Action, a ) : IEnumerator,
Awake ( ) : void
OnDestroy ( ) : void

Описание методов

Enqueue() публичный Метод

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.
Результат void

Enqueue() публичный Метод

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.
Результат void

Exists() публичный статический Метод

public static Exists ( ) : bool
Результат bool

Instance() публичный статический Метод

public static Instance ( ) : UnityMainThreadDispatcher,
Результат UnityMainThreadDispatcher,

Update() публичный Метод

public Update ( ) : void
Результат void