C# 클래스 UnityTools.Threading.UnityDispatcher

The UnityDispatcher class allows you to execute code on the main Unity thread. This is useful for situations where you need code on a seperate thread (i.e. slow IO operations) to access things that can only be accessed on the main thread.
상속: UnityEngine.MonoBehaviour, IInitialiseOnStartup, IDispatcher
파일 보기 프로젝트 열기: NoxHarmonium/unity-tools 1 사용 예제들

공개 메소드들

메소드 설명
Dispatch ( System.Action action ) : void

Dispatches the action asynchronously on the Unity main thread. The action will execute in the next frame update phase.

DispatchWait ( System.Action action ) : void

Dispatches the action asynchronously on the Unity main thread but blocks the current thread until the action is executed. The action will execute in the next frame update phase.

Initialise ( ) : void
PumpActionQueue ( ) : void

This method should be executed on the main dispatch thread to execute the queued dispatch actions.

비공개 메소드들

메소드 설명
Awake ( ) : void
GetCurrentThreadId ( ) : int
Update ( ) : void

메소드 상세

Dispatch() 공개 메소드

Dispatches the action asynchronously on the Unity main thread. The action will execute in the next frame update phase.
public Dispatch ( System.Action action ) : void
action System.Action The action to execute on the dispatch thread.
리턴 void

DispatchWait() 공개 메소드

Dispatches the action asynchronously on the Unity main thread but blocks the current thread until the action is executed. The action will execute in the next frame update phase.
public DispatchWait ( System.Action action ) : void
action System.Action The action to execute on the dispatch thread.
리턴 void

Initialise() 공개 메소드

public Initialise ( ) : void
리턴 void

PumpActionQueue() 공개 메소드

This method should be executed on the main dispatch thread to execute the queued dispatch actions.
public PumpActionQueue ( ) : void
리턴 void