Photon .NET Client API 4.1.4.8

Public Member Functions | List of all members
Photon.Realtime.IOnEventCallback Interface Reference

Event callback for the Realtime Api. Covers events from the server and those sent by clients via OpRaiseEvent. More...

Public Member Functions

void OnEvent (EventData photonEvent)
 Called for any incoming events. More...
 

Detailed Description

Event callback for the Realtime Api. Covers events from the server and those sent by clients via OpRaiseEvent.

Classes that implement this interface must be registered to get callbacks for various situations.

To register for callbacks, call LoadBalancingClient.AddCallbackTarget and pass the class implementing this interface To stop getting callbacks, call LoadBalancingClient.RemoveCallbackTarget and pass the class implementing this interface

Member Function Documentation

◆ OnEvent()

void Photon.Realtime.IOnEventCallback.OnEvent ( EventData  photonEvent)

Called for any incoming events.

To receive events, implement IOnEventCallback in any class and register it via AddCallbackTarget (either in LoadBalancingClient or PhotonNetwork).

With the EventData.Sender you can look up the Player who sent the event.

It is best practice to assign an eventCode for each different type of content and action, so the Code will be essential to read the incoming events.


The documentation for this interface was generated from the following file: