Photon Server API Documentation v5.0RC1

Public Member Functions | Properties | List of all members
Photon.Hive.Plugin.PluginWrapper Class Reference
Inheritance diagram for Photon.Hive.Plugin.PluginWrapper:
Photon.Hive.Plugin.IGamePlugin

Public Member Functions

 PluginWrapper (IPluginInstance instance)
 
void BeforeCloseGame (IBeforeCloseGameCallInfo info)
 Plugin callback called when a game instance is about to be removed from Photon servers memory. More...
 
void BeforeJoin (IBeforeJoinGameCallInfo info)
 Plugin callback called when a peer is about to join a room. This is triggered by Op Join when a game instance is in Photon servers memory. More...
 
void BeforeSetProperties (IBeforeSetPropertiesCallInfo info)
 Plugin callback triggered by Op SetProperties. More...
 
void OnCloseGame (ICloseGameCallInfo info)
 Plugin callback called when info.Continue() is called inside IGamePlugin.BeforeCloseGame. More...
 
void OnCreateGame (ICreateGameCallInfo info)
 Plugin callback called when a game instance is about to be created on server. It can be triggered by Op CreateGame or Op JoinGame if JoinMode.CreateIfNotExists, JoinOrRejoin or RejoinOnly. More...
 
void OnJoin (IJoinGameCallInfo info)
 Plugin callback called when info.Continue() is called inside IGamePlugin.BeforeJoin. More...
 
void OnLeave (ILeaveGameCallInfo info)
 Plugin callback when a peer is disconnected from the room. The corresponding actor is either removed or marked as inactive. This can be triggered by an explicit or unexpected Disconnect or a call to Op Leave or RemoveActor. More...
 
void OnRaiseEvent (IRaiseEventCallInfo info)
 Plugin callback when Op RaiseEvent is called. More...
 
void OnSetProperties (ISetPropertiesCallInfo info)
 Plugin callback called when info.Continue() is called inside IGamePlugin.BeforeSetProperties. More...
 
bool OnUnknownType (Type type, ref object value)
 Callback triggered when trying to deseriliaze unknwon type. More...
 
bool SetupInstance (IPluginHost host, Dictionary< string, string > config, out string errorMsg)
 Initialize plugin instance. More...
 
void ReportError (short errorCode, Exception e, object state=null)
 Callback to report an internal plugin error. More...
 

Properties

IGamePlugin Plugin [get]
 
EnvironmentVersion EnvironmentVersion [get]
 
IPluginInstance PluginInstance [get]
 
ErrorPlugin ErrorPlugin [get]
 
string Name [get]
 
string Version [get]
 
bool IsPersistent [get]
 
- Properties inherited from Photon.Hive.Plugin.IGamePlugin
string Name [get]
 Name of the plugin. Default is not allowed. This should be the name used when requesting the plugin from the client in CreateGame operation. This will be returned to the client in the CreateGame operation response. More...
 
string Version [get]
 Version of the plugin. This will be returned to the client in the CreateGame operation response. More...
 
bool IsPersistent [get]
 Flag used with webhooks plugin to indicate whether or not rooms should be persisted between connections. If true, SerializedGameState should be sent to web service before removing the room from memory. Also it could be loaded in OnCreateGame or BeforeJoin. More...
 

Constructor & Destructor Documentation

◆ PluginWrapper()

Photon.Hive.Plugin.PluginWrapper.PluginWrapper ( IPluginInstance  instance)
inline

Member Function Documentation

◆ BeforeCloseGame()

void Photon.Hive.Plugin.PluginWrapper.BeforeCloseGame ( IBeforeCloseGameCallInfo  info)
inline

Plugin callback called when a game instance is about to be removed from Photon servers memory.

Parameters
infoData passed in the callback call.

Implements Photon.Hive.Plugin.IGamePlugin.

◆ BeforeJoin()

void Photon.Hive.Plugin.PluginWrapper.BeforeJoin ( IBeforeJoinGameCallInfo  info)
inline

Plugin callback called when a peer is about to join a room. This is triggered by Op Join when a game instance is in Photon servers memory.

Parameters
infoData passed in the callback call.

Implements Photon.Hive.Plugin.IGamePlugin.

◆ BeforeSetProperties()

void Photon.Hive.Plugin.PluginWrapper.BeforeSetProperties ( IBeforeSetPropertiesCallInfo  info)
inline

Plugin callback triggered by Op SetProperties.

Parameters
infoData passed in the callback call.

Implements Photon.Hive.Plugin.IGamePlugin.

◆ OnCloseGame()

void Photon.Hive.Plugin.PluginWrapper.OnCloseGame ( ICloseGameCallInfo  info)
inline

Plugin callback called when info.Continue() is called inside IGamePlugin.BeforeCloseGame.

Parameters
infoData passed in the callback call.

Implements Photon.Hive.Plugin.IGamePlugin.

◆ OnCreateGame()

void Photon.Hive.Plugin.PluginWrapper.OnCreateGame ( ICreateGameCallInfo  info)
inline

Plugin callback called when a game instance is about to be created on server. It can be triggered by Op CreateGame or Op JoinGame if JoinMode.CreateIfNotExists, JoinOrRejoin or RejoinOnly.

Parameters
infoData passed in the callback call.

Implements Photon.Hive.Plugin.IGamePlugin.

◆ OnJoin()

void Photon.Hive.Plugin.PluginWrapper.OnJoin ( IJoinGameCallInfo  info)
inline

Plugin callback called when info.Continue() is called inside IGamePlugin.BeforeJoin.

Parameters
infoData passed in the callback call.

Implements Photon.Hive.Plugin.IGamePlugin.

◆ OnLeave()

void Photon.Hive.Plugin.PluginWrapper.OnLeave ( ILeaveGameCallInfo  info)
inline

Plugin callback when a peer is disconnected from the room. The corresponding actor is either removed or marked as inactive. This can be triggered by an explicit or unexpected Disconnect or a call to Op Leave or RemoveActor.

Parameters
infoData passed in the callback call.

Implements Photon.Hive.Plugin.IGamePlugin.

◆ OnRaiseEvent()

void Photon.Hive.Plugin.PluginWrapper.OnRaiseEvent ( IRaiseEventCallInfo  info)
inline

Plugin callback when Op RaiseEvent is called.

Parameters
infoData passed in the callback call.

Implements Photon.Hive.Plugin.IGamePlugin.

◆ OnSetProperties()

void Photon.Hive.Plugin.PluginWrapper.OnSetProperties ( ISetPropertiesCallInfo  info)
inline

Plugin callback called when info.Continue() is called inside IGamePlugin.BeforeSetProperties.

Parameters
infoData passed in the callback call.

Implements Photon.Hive.Plugin.IGamePlugin.

◆ OnUnknownType()

bool Photon.Hive.Plugin.PluginWrapper.OnUnknownType ( Type  type,
ref object  value 
)
inline

Callback triggered when trying to deseriliaze unknwon type.

Parameters
typeThe Type of the object.
valueThe object with unknown type.
Returns
If the unkown type could be handled successfully.

Implements Photon.Hive.Plugin.IGamePlugin.

◆ ReportError()

void Photon.Hive.Plugin.PluginWrapper.ReportError ( short  errorCode,
Exception  e,
object  state = null 
)
inline

Callback to report an internal plugin error.

Parameters
errorCodeCode of the error. Photon.Hive.Plugin.ErrorCodes
eException thrown.
stateOptional object to be added in the report. It could help in debugging the error.

Implements Photon.Hive.Plugin.IGamePlugin.

◆ SetupInstance()

bool Photon.Hive.Plugin.PluginWrapper.SetupInstance ( IPluginHost  host,
Dictionary< string, string >  config,
out string  errorMsg 
)
inline

Initialize plugin instance.

Parameters
hostThe game hosting the plugin.
configThe plugin assembly key/value configuration entries.
errorMsgError message in case something wrong happens when setting up the plugin instance.
Returns
If the plugin instance setup is successful.

Implements Photon.Hive.Plugin.IGamePlugin.

Property Documentation

◆ EnvironmentVersion

EnvironmentVersion Photon.Hive.Plugin.PluginWrapper.EnvironmentVersion
get

◆ ErrorPlugin

ErrorPlugin Photon.Hive.Plugin.PluginWrapper.ErrorPlugin
get

◆ IsPersistent

bool Photon.Hive.Plugin.PluginWrapper.IsPersistent
get

◆ Name

string Photon.Hive.Plugin.PluginWrapper.Name
get

◆ Plugin

IGamePlugin Photon.Hive.Plugin.PluginWrapper.Plugin
get

◆ PluginInstance

IPluginInstance Photon.Hive.Plugin.PluginWrapper.PluginInstance
get

◆ Version

string Photon.Hive.Plugin.PluginWrapper.Version
get