Class NDMFSyncContext
The default unity synchronization context runs in the context of the Player Loop, which blocks access to R/O
mesh data. As such, NDMF provides a synchronization context which runs in the context of
EditorApplication.delayCall
instead.
public static class NDMFSyncContext
- Inheritance
-
NDMFSyncContext
- Inherited Members
Fields
Context
public static SynchronizationContext Context
Field Value
Methods
RunOnMainThread(SendOrPostCallback, object)
Runs the given function on the unity main thread, passing the given target as an argument. The function will be invoked synchronously if called from the main thread; otherwise, it will be run asynchronously.
public static void RunOnMainThread(SendOrPostCallback receiver, object target)
Parameters
receiver
SendOrPostCallbacktarget
object
Scope()
Switches to the NDMF synchronization context, and returns an IDisposable which will restore the prior synchronization context.
public static IDisposable Scope()