RegisterEventHandler
Registers a handler for a specific event type. The handler is called whenever a message of the specified type is sent. Messages are sent using EventService.Emit or EventService.Request.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: UnityEditor.MPE
- Assembly: UnityEditor.CoreModule
RegisterEventHandler(string, Action<string, Object[]>)
Registers a handler for a specific event type. The handler is called whenever a message of the specified type is sent. Messages are sent using EventService.Emit or EventService.Request.
public static Action RegisterEventHandler(string eventType, Action<string, object[]> handler)
Parameters
Returns
Type | Description |
|---|---|
| Action | An action that, when invoked, unregisters the handler (see Off). |
RegisterEventHandler(string, Func<string, Object[], Object>)
Registers a handler for a specific event type. The handler is called whenever a message of the specified type is sent. Messages are sent using EventService.Emit or EventService.Request.
public static Action RegisterEventHandler(string eventType, Func<string, object[], object> handler)
Parameters
Returns
Type | Description |
|---|---|
| Action | An action that, when invoked, unregisters the handler (see Off). |