Allows registering for individual callbacks of the Photon Realtime API, using Message Types.
More...
|
| void | Clear () |
| | Unregisters everything. More...
|
| |
| IDisposable | ListenManual< MessageType > (System.Action< MessageType > handler) |
| | Register a message handler. No listener, you unregister by calling Dispose on returned object. Handler is not limited in what it is allowed to capture. More...
|
| |
| YieldListener< MessageType > | ListenWait< MessageType > () |
| | Use this in coroutines. Yield will return when at least one event of type MessageType has been raised. To get the messages use YieldListener<MessageType>.First or YieldListener<MessageType>.Messages More...
|
| |
| bool | Raise< MessageType > (MessageType message) |
| | Invoke all registered handlers for this message type immediately. More...
|
| |
| void | RemoveUnusedHandlers () |
| | Removes handlers that will now longer be called because their listeners have been destroyed. Normally there's no reason to call that, since EventBetter does it behind the scenes in every LateUpdate. More...
|
| |
Allows registering for individual callbacks of the Photon Realtime API, using Message Types.
Intentionally made partial, in case you want to extend it easily.
In Unity, the EventBetterWorker is used to clean up unused registrations in LateUpdate() automatically. In .Net apps, the game logic should RemoveUnusedHandlers.