Photon Unity Networking 2  v2.1
English | 日本語 | 한국
Public Attributes | List of all members
ParameterCode Class Reference

Class for constants. Codes for parameters of Operations and Events. More...

Public Attributes

const byte SuppressRoomEvents = 237
 (237) A bool parameter for creating games. If set to true, no room events are sent to the clients on join and leave. Default: false (and not sent). More...
 
const byte EmptyRoomTTL = 236
 (236) Time To Live (TTL) for a room when the last player leaves. Keeps room in memory for case a player re-joins soon. In milliseconds. More...
 
const byte PlayerTTL = 235
 (235) Time To Live (TTL) for an 'actor' in a room. If a client disconnects, this actor is inactive first and removed after this timeout. In milliseconds. More...
 
const byte EventForward = 234
 (234) Optional parameter of OpRaiseEvent and OpSetCustomProperties to forward the event/operation to a web-service. More...
 
const byte IsComingBack = (byte)233
 (233) Optional parameter of OpLeave in async games. If false, the player does abandons the game (forever). By default players become inactive and can re-join. More...
 
const byte IsInactive = (byte)233
 (233) Used in EvLeave to describe if a user is inactive (and might come back) or not. In rooms with PlayerTTL, becoming inactive is the default case. More...
 
const byte CheckUserOnJoin = (byte)232
 (232) Used when creating rooms to define if any userid can join the room only once. More...
 
const byte ExpectedValues = (byte)231
 (231) Code for "Check And Swap" (CAS) when changing properties. More...
 
const byte Address = 230
 (230) Address of a (game) server to use. More...
 
const byte PeerCount = 229
 (229) Count of players in this application in a rooms (used in stats event) More...
 
const byte GameCount = 228
 (228) Count of games in this application (used in stats event) More...
 
const byte MasterPeerCount = 227
 (227) Count of players on the master server (in this app, looking for rooms) More...
 
const byte UserId = 225
 (225) User's ID More...
 
const byte ApplicationId = 224
 (224) Your application's ID: a name on your own Photon or a GUID on the Photon Cloud More...
 
const byte Position = 223
 (223) Not used currently (as "Position"). If you get queued before connect, this is your position More...
 
const byte MatchMakingType = 223
 (223) Modifies the matchmaking algorithm used for OpJoinRandom. Allowed parameter values are defined in enum MatchmakingMode. More...
 
const byte GameList = 222
 (222) List of RoomInfos about open / listed rooms More...
 
const byte Secret = 221
 (221) Internally used to establish encryption More...
 
const byte AppVersion = 220
 (220) Version of your application More...
 
const byte AzureNodeInfo = 210
 (210) Internally used in case of hosting by Azure More...
 
const byte AzureLocalNodeId = 209
 (209) Internally used in case of hosting by Azure More...
 
const byte AzureMasterNodeId = 208
 (208) Internally used in case of hosting by Azure More...
 
const byte RoomName = (byte)255
 (255) Code for the gameId/roomName (a unique name per room). Used in OpJoin and similar. More...
 
const byte Broadcast = (byte)250
 (250) Code for broadcast parameter of OpSetProperties method. More...
 
const byte ActorList = (byte)252
 (252) Code for list of players in a room. Currently not used. More...
 
const byte ActorNr = (byte)254
 (254) Code of the Actor of an operation. Used for property get and set. More...
 
const byte PlayerProperties = (byte)249
 (249) Code for property set (Hashtable). More...
 
const byte CustomEventContent = (byte)245
 (245) Code of data/custom content of an event. Used in OpRaiseEvent. More...
 
const byte Data = (byte)245
 (245) Code of data of an event. Used in OpRaiseEvent. More...
 
const byte Code = (byte)244
 (244) Code used when sending some code-related parameter, like OpRaiseEvent's event-code. More...
 
const byte GameProperties = (byte)248
 (248) Code for property set (Hashtable). More...
 
const byte Properties = (byte)251
 (251) Code for property-set (Hashtable). This key is used when sending only one set of properties. If either ActorProperties or GameProperties are used (or both), check those keys. More...
 
const byte TargetActorNr = (byte)253
 (253) Code of the target Actor of an operation. Used for property set. Is 0 for game More...
 
const byte ReceiverGroup = (byte)246
 (246) Code to select the receivers of events (used in Lite, Operation RaiseEvent). More...
 
const byte Cache = (byte)247
 (247) Code for caching events while raising them. More...
 
const byte CleanupCacheOnLeave = (byte)241
 (241) Bool parameter of CreateGame Operation. If true, server cleans up roomcache of leaving players (their cached events get removed). More...
 
const byte Group = 240
 (240) Code for "group" operation-parameter (as used in Op RaiseEvent). More...
 
const byte Remove = 239
 (239) The "Remove" operation-parameter can be used to remove something from a list. E.g. remove groups from player's interest groups. More...
 
const byte PublishUserId = 239
 (239) Used in Op Join to define if UserIds of the players are broadcast in the room. Useful for FindFriends and reserving slots for expected users. More...
 
const byte Add = 238
 (238) The "Add" operation-parameter can be used to add something to some list or set. E.g. add groups to player's interest groups. More...
 
const byte Info = 218
 (218) Content for EventCode.ErrorInfo and internal debug operations. More...
 
const byte ClientAuthenticationType = 217
 (217) This key's (byte) value defines the target custom authentication type/service the client connects with. Used in OpAuthenticate More...
 
const byte ClientAuthenticationParams = 216
 (216) This key's (string) value provides parameters sent to the custom authentication type/service the client connects with. Used in OpAuthenticate More...
 
const byte JoinMode = 215
 (215) Makes the server create a room if it doesn't exist. OpJoin uses this to always enter a room, unless it exists and is full/closed. More...
 
const byte ClientAuthenticationData = 214
 (214) This key's (string or byte[]) value provides parameters sent to the custom authentication service setup in Photon Dashboard. Used in OpAuthenticate More...
 
const byte MasterClientId = (byte)203
 (203) Code for MasterClientId, which is synced by server. When sent as op-parameter this is code 203. More...
 
const byte FindFriendsRequestList = (byte)1
 (1) Used in Op FindFriends request. Value must be string[] of friends to look up. More...
 
const byte FindFriendsResponseOnlineList = (byte)1
 (1) Used in Op FindFriends response. Contains bool[] list of online states (false if not online). More...
 
const byte FindFriendsResponseRoomIdList = (byte)2
 (2) Used in Op FindFriends response. Contains string[] of room names ("" where not known or no room joined). More...
 
const byte LobbyName = (byte)213
 (213) Used in matchmaking-related methods and when creating a room to name a lobby (to join or to attach a room to). More...
 
const byte LobbyType = (byte)212
 (212) Used in matchmaking-related methods and when creating a room to define the type of a lobby. Combined with the lobby name this identifies the lobby. More...
 
const byte LobbyStats = (byte)211
 (211) This (optional) parameter can be sent in Op Authenticate to turn on Lobby Stats (info about lobby names and their user- and game-counts). See: PhotonNetwork.Lobbies More...
 
const byte Region = (byte)210
 (210) Used for region values in OpAuth and OpGetRegions. More...
 
const byte UriPath = 209
 (209) Path of the WebRPC that got called. Also known as "WebRpc Name". Type: string. More...
 
const byte WebRpcParameters = 208
 (208) Parameters for a WebRPC as: Dictionary<string, object>. This will get serialized to JSon. More...
 
const byte WebRpcReturnCode = 207
 (207) ReturnCode for the WebRPC, as sent by the web service (not by Photon, which uses ErrorCode). Type: byte. More...
 
const byte WebRpcReturnMessage = 206
 (206) Message returned by WebRPC server. Analog to Photon's debug message. Type: string. More...
 
const byte CacheSliceIndex = 205
 (205) Used to define a "slice" for cached events. Slices can easily be removed from cache. Type: int. More...
 
const byte Plugins = 204
 (204) Informs the server of the expected plugin setup. More...
 
const byte NickName = 202
 (202) Used by the server in Operation Responses, when it sends the nickname of the client (the user's nickname). More...
 
const byte PluginName = 201
 (201) Informs user about name of plugin load to game More...
 
const byte PluginVersion = 200
 (200) Informs user about version of plugin load to game More...
 
const byte ExpectedProtocol = 195
 (195) Protocol which will be used by client to connect master/game servers. Used for nameserver. More...
 
const byte CustomInitData = 194
 (194) Set of custom parameters which are sent in auth request. More...
 
const byte EncryptionMode = 193
 (193) How are we going to encrypt data. More...
 
const byte EncryptionData = 192
 (192) Parameter of Authentication, which contains encryption keys (depends on AuthMode and EncryptionMode). More...
 
const byte RoomOptionFlags = 191
 (191) An int parameter summarizing several boolean room-options with bit-flags. More...
 

Detailed Description

Class for constants. Codes for parameters of Operations and Events.

Pun uses these constants internally.

Member Data Documentation

const byte ActorList = (byte)252

(252) Code for list of players in a room. Currently not used.

const byte ActorNr = (byte)254

(254) Code of the Actor of an operation. Used for property get and set.

const byte Add = 238

(238) The "Add" operation-parameter can be used to add something to some list or set. E.g. add groups to player's interest groups.

const byte Address = 230

(230) Address of a (game) server to use.

const byte ApplicationId = 224

(224) Your application's ID: a name on your own Photon or a GUID on the Photon Cloud

const byte AppVersion = 220

(220) Version of your application

const byte AzureLocalNodeId = 209

(209) Internally used in case of hosting by Azure

const byte AzureMasterNodeId = 208

(208) Internally used in case of hosting by Azure

const byte AzureNodeInfo = 210

(210) Internally used in case of hosting by Azure

const byte Broadcast = (byte)250

(250) Code for broadcast parameter of OpSetProperties method.

const byte Cache = (byte)247

(247) Code for caching events while raising them.

const byte CacheSliceIndex = 205

(205) Used to define a "slice" for cached events. Slices can easily be removed from cache. Type: int.

const byte CheckUserOnJoin = (byte)232

(232) Used when creating rooms to define if any userid can join the room only once.

const byte CleanupCacheOnLeave = (byte)241

(241) Bool parameter of CreateGame Operation. If true, server cleans up roomcache of leaving players (their cached events get removed).

const byte ClientAuthenticationData = 214

(214) This key's (string or byte[]) value provides parameters sent to the custom authentication service setup in Photon Dashboard. Used in OpAuthenticate

const byte ClientAuthenticationParams = 216

(216) This key's (string) value provides parameters sent to the custom authentication type/service the client connects with. Used in OpAuthenticate

const byte ClientAuthenticationType = 217

(217) This key's (byte) value defines the target custom authentication type/service the client connects with. Used in OpAuthenticate

const byte Code = (byte)244

(244) Code used when sending some code-related parameter, like OpRaiseEvent's event-code.

This is not the same as the Operation's code, which is no longer sent as part of the parameter Dictionary in Photon 3.

const byte CustomEventContent = (byte)245

(245) Code of data/custom content of an event. Used in OpRaiseEvent.

const byte CustomInitData = 194

(194) Set of custom parameters which are sent in auth request.

const byte Data = (byte)245

(245) Code of data of an event. Used in OpRaiseEvent.

const byte EmptyRoomTTL = 236

(236) Time To Live (TTL) for a room when the last player leaves. Keeps room in memory for case a player re-joins soon. In milliseconds.

const byte EncryptionData = 192

(192) Parameter of Authentication, which contains encryption keys (depends on AuthMode and EncryptionMode).

const byte EncryptionMode = 193

(193) How are we going to encrypt data.

const byte EventForward = 234

(234) Optional parameter of OpRaiseEvent and OpSetCustomProperties to forward the event/operation to a web-service.

const byte ExpectedProtocol = 195

(195) Protocol which will be used by client to connect master/game servers. Used for nameserver.

const byte ExpectedValues = (byte)231

(231) Code for "Check And Swap" (CAS) when changing properties.

const byte FindFriendsRequestList = (byte)1

(1) Used in Op FindFriends request. Value must be string[] of friends to look up.

const byte FindFriendsResponseOnlineList = (byte)1

(1) Used in Op FindFriends response. Contains bool[] list of online states (false if not online).

const byte FindFriendsResponseRoomIdList = (byte)2

(2) Used in Op FindFriends response. Contains string[] of room names ("" where not known or no room joined).

const byte GameCount = 228

(228) Count of games in this application (used in stats event)

const byte GameList = 222

(222) List of RoomInfos about open / listed rooms

const byte GameProperties = (byte)248

(248) Code for property set (Hashtable).

const byte Group = 240

(240) Code for "group" operation-parameter (as used in Op RaiseEvent).

const byte Info = 218

(218) Content for EventCode.ErrorInfo and internal debug operations.

const byte IsComingBack = (byte)233

(233) Optional parameter of OpLeave in async games. If false, the player does abandons the game (forever). By default players become inactive and can re-join.

const byte IsInactive = (byte)233

(233) Used in EvLeave to describe if a user is inactive (and might come back) or not. In rooms with PlayerTTL, becoming inactive is the default case.

const byte JoinMode = 215

(215) Makes the server create a room if it doesn't exist. OpJoin uses this to always enter a room, unless it exists and is full/closed.

(215) The JoinMode enum defines which variant of joining a room will be executed: Join only if available, create if not exists or re-join.

Replaces CreateIfNotExists which was only a bool-value.

const byte LobbyName = (byte)213

(213) Used in matchmaking-related methods and when creating a room to name a lobby (to join or to attach a room to).

const byte LobbyStats = (byte)211

(211) This (optional) parameter can be sent in Op Authenticate to turn on Lobby Stats (info about lobby names and their user- and game-counts). See: PhotonNetwork.Lobbies

const byte LobbyType = (byte)212

(212) Used in matchmaking-related methods and when creating a room to define the type of a lobby. Combined with the lobby name this identifies the lobby.

const byte MasterClientId = (byte)203

(203) Code for MasterClientId, which is synced by server. When sent as op-parameter this is code 203.

Tightly related to GamePropertyKey.MasterClientId.

const byte MasterPeerCount = 227

(227) Count of players on the master server (in this app, looking for rooms)

const byte MatchMakingType = 223

(223) Modifies the matchmaking algorithm used for OpJoinRandom. Allowed parameter values are defined in enum MatchmakingMode.

const byte NickName = 202

(202) Used by the server in Operation Responses, when it sends the nickname of the client (the user's nickname).

const byte PeerCount = 229

(229) Count of players in this application in a rooms (used in stats event)

const byte PlayerProperties = (byte)249

(249) Code for property set (Hashtable).

const byte PlayerTTL = 235

(235) Time To Live (TTL) for an 'actor' in a room. If a client disconnects, this actor is inactive first and removed after this timeout. In milliseconds.

const byte PluginName = 201

(201) Informs user about name of plugin load to game

const byte Plugins = 204

(204) Informs the server of the expected plugin setup.

The operation will fail in case of a plugin mismatch returning error code PluginMismatch 32751(0x7FFF - 16). Setting string[]{} means the client expects no plugin to be setup. Note: for backwards compatibility null omits any check.

const byte PluginVersion = 200

(200) Informs user about version of plugin load to game

const byte Position = 223

(223) Not used currently (as "Position"). If you get queued before connect, this is your position

const byte Properties = (byte)251

(251) Code for property-set (Hashtable). This key is used when sending only one set of properties. If either ActorProperties or GameProperties are used (or both), check those keys.

const byte PublishUserId = 239

(239) Used in Op Join to define if UserIds of the players are broadcast in the room. Useful for FindFriends and reserving slots for expected users.

const byte ReceiverGroup = (byte)246

(246) Code to select the receivers of events (used in Lite, Operation RaiseEvent).

const byte Region = (byte)210

(210) Used for region values in OpAuth and OpGetRegions.

const byte Remove = 239

(239) The "Remove" operation-parameter can be used to remove something from a list. E.g. remove groups from player's interest groups.

const byte RoomName = (byte)255

(255) Code for the gameId/roomName (a unique name per room). Used in OpJoin and similar.

const byte RoomOptionFlags = 191

(191) An int parameter summarizing several boolean room-options with bit-flags.

const byte Secret = 221

(221) Internally used to establish encryption

const byte SuppressRoomEvents = 237

(237) A bool parameter for creating games. If set to true, no room events are sent to the clients on join and leave. Default: false (and not sent).

const byte TargetActorNr = (byte)253

(253) Code of the target Actor of an operation. Used for property set. Is 0 for game

const byte UriPath = 209

(209) Path of the WebRPC that got called. Also known as "WebRpc Name". Type: string.

const byte UserId = 225

(225) User's ID

const byte WebRpcParameters = 208

(208) Parameters for a WebRPC as: Dictionary<string, object>. This will get serialized to JSon.

const byte WebRpcReturnCode = 207

(207) ReturnCode for the WebRPC, as sent by the web service (not by Photon, which uses ErrorCode). Type: byte.

const byte WebRpcReturnMessage = 206

(206) Message returned by WebRPC server. Analog to Photon's debug message. Type: string.