Photon Unity Networking 2 2.45

Public Member Functions | List of all members
IErrorInfoCallback Interface Reference

Interface for EventCode.ErrorInfo event callback for the Realtime Api. More...

Inherited by MonoBehaviourPunCallbacks, and ErrorInfoCallbacksContainer.

Public Member Functions

void OnErrorInfo (ErrorInfo errorInfo)
 Called when the client receives an event from the server indicating that an error happened there. More...
 

Detailed Description

Interface for EventCode.ErrorInfo event callback for the Realtime Api.

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

◆ OnErrorInfo()

void OnErrorInfo ( ErrorInfo  errorInfo)

Called when the client receives an event from the server indicating that an error happened there.

In most cases this could be either:

  1. an error from webhooks plugin (if HasErrorInfo is enabled), read more here: https://doc.photonengine.com/en-us/realtime/current/gameplay/web-extensions/webhooks#options
  2. an error sent from a custom server plugin via PluginHost.BroadcastErrorInfoEvent, see example here: https://doc.photonengine.com/en-us/server/current/plugins/manual#handling_http_response
  3. an error sent from the server, for example, when the limit of cached events has been exceeded in the room (all clients will be disconnected and the room will be closed in this case) read more here: https://doc.photonengine.com/en-us/realtime/current/gameplay/cached-events#special_considerations

If you implement IOnEventCallback.OnEvent or LoadBalancingClient.EventReceived you will also get this event.

Parameters
errorInfoObject containing information about the error

Implemented in MonoBehaviourPunCallbacks.