Base interface that should be implemented by any plugin class. More...
Public Member Functions | |
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 | |
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... | |
Base interface that should be implemented by any plugin class.
void Photon.Hive.Plugin.IGamePlugin.BeforeCloseGame | ( | IBeforeCloseGameCallInfo | info | ) |
Plugin callback called when a game instance is about to be removed from Photon servers memory.
info | Data passed in the callback call. |
Implemented in Photon.Hive.Plugin.PluginBase, and Photon.Hive.Plugin.ErrorPlugin.
void Photon.Hive.Plugin.IGamePlugin.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.
info | Data passed in the callback call. |
Implemented in Photon.Hive.Plugin.PluginBase, and Photon.Hive.Plugin.ErrorPlugin.
void Photon.Hive.Plugin.IGamePlugin.BeforeSetProperties | ( | IBeforeSetPropertiesCallInfo | info | ) |
Plugin callback triggered by Op SetProperties.
info | Data passed in the callback call. |
Implemented in Photon.Hive.Plugin.PluginBase, and Photon.Hive.Plugin.ErrorPlugin.
void Photon.Hive.Plugin.IGamePlugin.OnCloseGame | ( | ICloseGameCallInfo | info | ) |
Plugin callback called when info.Continue() is called inside IGamePlugin.BeforeCloseGame.
info | Data passed in the callback call. |
Implemented in Photon.Hive.Plugin.PluginBase, and Photon.Hive.Plugin.ErrorPlugin.
void Photon.Hive.Plugin.IGamePlugin.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.
info | Data passed in the callback call. |
Implemented in Photon.Hive.Plugin.PluginBase, and Photon.Hive.Plugin.ErrorPlugin.
void Photon.Hive.Plugin.IGamePlugin.OnJoin | ( | IJoinGameCallInfo | info | ) |
Plugin callback called when info.Continue() is called inside IGamePlugin.BeforeJoin.
info | Data passed in the callback call. |
Implemented in Photon.Hive.Plugin.PluginBase, and Photon.Hive.Plugin.ErrorPlugin.
void Photon.Hive.Plugin.IGamePlugin.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.
info | Data passed in the callback call. |
Implemented in Photon.Hive.Plugin.PluginBase, and Photon.Hive.Plugin.ErrorPlugin.
void Photon.Hive.Plugin.IGamePlugin.OnRaiseEvent | ( | IRaiseEventCallInfo | info | ) |
Plugin callback when Op RaiseEvent is called.
info | Data passed in the callback call. |
Implemented in Photon.Hive.Plugin.PluginBase, and Photon.Hive.Plugin.ErrorPlugin.
void Photon.Hive.Plugin.IGamePlugin.OnSetProperties | ( | ISetPropertiesCallInfo | info | ) |
Plugin callback called when info.Continue() is called inside IGamePlugin.BeforeSetProperties.
info | Data passed in the callback call. |
Implemented in Photon.Hive.Plugin.PluginBase, and Photon.Hive.Plugin.ErrorPlugin.
bool Photon.Hive.Plugin.IGamePlugin.OnUnknownType | ( | Type | type, |
ref object | value | ||
) |
Callback triggered when trying to deseriliaze unknwon type.
type | The Type of the object. |
value | The object with unknown type. |
Implemented in Photon.Hive.Plugin.PluginBase, and Photon.Hive.Plugin.ErrorPlugin.
void Photon.Hive.Plugin.IGamePlugin.ReportError | ( | short | errorCode, |
Exception | e, | ||
object | state = null |
||
) |
Callback to report an internal plugin error.
errorCode | Code of the error. Photon.Hive.Plugin.ErrorCodes |
e | Exception thrown. |
state | Optional object to be added in the report. It could help in debugging the error. |
Implemented in Photon.Hive.Plugin.PluginBase, and Photon.Hive.Plugin.ErrorPlugin.
bool Photon.Hive.Plugin.IGamePlugin.SetupInstance | ( | IPluginHost | host, |
Dictionary< string, string > | config, | ||
out string | errorMsg | ||
) |
Initialize plugin instance.
host | The game hosting the plugin. |
config | The plugin assembly key/value configuration entries. |
errorMsg | Error message in case something wrong happens when setting up the plugin instance. |
Implemented in Photon.Hive.Plugin.PluginBase, and Photon.Hive.Plugin.ErrorPlugin.
|
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.
|
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.
|
get |
Version of the plugin. This will be returned to the client in the CreateGame operation response.