MLThreadDispatch
NameSpace: Native
Handles dispatching calls from the Magic Leap native thread to the Unity thread
Public Methods
void Call
A method that queues an action without a payload
public static void Call(
System.Delegate callback
)
Parameters
Type | Name | Description |
---|---|---|
System.Delegate | callback | A callback function to be called when the delegate is invoked |
void Call
A method that queues an action without a payload
public static void Call(
System.Action callback
)
Parameters
Type | Name | Description |
---|---|---|
System.Action | callback | A callback function to be called when the action is invoked |
void Call< A >
A template method that queues an action with a single payload
public static void Call< A >(
A a,
System.Delegate callback
)
Parameters
Type | Name | Description |
---|---|---|
A | a | Payload 1 |
System.Delegate | callback | A callback function to be called when the delegate is invoked |
Template Parameters:
A
Payload type
void Call< A, B >
A template method that queues an action with two payloads
public static void Call< A, B >(
A a,
B b,
System.Delegate callback
)
Parameters
Type | Name | Description |
---|---|---|
A | a | Payload 1 |
B | b | Payload 2 |
System.Delegate | callback | A callback function to be called when the delegate is invoked |
Template Parameters:
A
First payload typeB
Second payload type
void Call< A, B, C >
A template method that queues an action with three payloads
public static void Call< A, B, C >(
A a,
B b,
C c,
System.Delegate callback
)
Parameters
Type | Name | Description |
---|---|---|
A | a | Payload 1 |
B | b | Payload 2 |
C | c | Payload 3 |
System.Delegate | callback | A callback function to be called when the delegate is invoked |
Template Parameters:
A
First payload typeB
Second payload typeC
Third payload type
void Call< A, B, C, D >
A template method that queues an action with four payloads
public static void Call< A, B, C, D >(
A a,
B b,
C c,
D d,
System.Delegate callback
)
Parameters
Type | Name | Description |
---|---|---|
A | a | Payload 1 |
B | b | Payload 2 |
C | c | Payload 3 |
D | d | Payload 4 |
System.Delegate | callback | A callback function to be called when the delegate is invoked |
Template Parameters:
A
First payload typeB
Second payload typeC
Third payload typeD
Forth payload type
void Call< A, B, C, D, E >
A template method that queues an action with five payloads
public static void Call< A, B, C, D, E >(
A a,
B b,
C c,
D d,
E e,
System.Delegate callback
)
Parameters
Type | Name | Description |
---|---|---|
A | a | Payload 1 |
B | b | Payload 2 |
C | c | Payload 3 |
D | d | Payload 4 |
E | e | Payload 5 |
System.Delegate | callback | A callback function to be called when the delegate is invoked |
Template Parameters:
A
First payload typeB
Second payload typeC
Third payload typeD
Forth payload typeE
Fifth payload type
void Call< A, B, C, D, E, F >
A template method that queues an action with six payloads
public static void Call< A, B, C, D, E, F >(
A a,
B b,
C c,
D d,
E e,
F f,
System.Delegate callback
)
Parameters
Type | Name | Description |
---|---|---|
A | a | Payload 1 |
B | b | Payload 2 |
C | c | Payload 3 |
D | d | Payload 4 |
E | e | Payload 5 |
F | f | Payload 6 |
System.Delegate | callback | A callback function to be called when the delegate is invoked |
Template Parameters:
A
First payload typeB
Second payload typeC
Third payload typeD
Forth payload typeE
Fifth payload typeF
Sixth payload type
void DispatchAll
Dispatch all queued items
public static void DispatchAll()
void ScheduleGraphics
public static void ScheduleGraphics(
System.Action callback
)
Parameters
Type | Name | Description |
---|---|---|
System.Action | callback |
void ScheduleMain
A method that schedules a callback on the main thread.
public static void ScheduleMain(
System.Action callback
)
Parameters
Type | Name | Description |
---|---|---|
System.Action | callback | A callback function to be called when the action is invoked |
void ScheduleWork
A method that schedules a callback on the worker thread.
public static void ScheduleWork(
Func< bool > function
)
Parameters
Type | Name | Description |
---|---|---|
Func< bool > | function | Function to call. Return TRUE when processing is done, FALSE to be placed back in the queue to be called again at a later time. |