Photon Unity Networking v1.101

Static Public Attributes | List of all members
ParameterCode Class Reference

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

Static 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 CreateRoom 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 FindFriendsOptions = 2
 (2) Used in Op FindFriends request. An integer containing option-flags to filter the results. 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 Cluster = 196
 (196) Cluster info provided in OpAuthenticate/OpAuthenticateOnce responses. 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

◆ ActorList

const byte ParameterCode.ActorList = (byte)252
static

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

◆ ActorNr

const byte ParameterCode.ActorNr = (byte)254
static

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

◆ Add

const byte ParameterCode.Add = 238
static

(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.

◆ Address

const byte ParameterCode.Address = 230
static

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

◆ ApplicationId

const byte ParameterCode.ApplicationId = 224
static

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

◆ AppVersion

const byte ParameterCode.AppVersion = 220
static

(220) Version of your application

◆ AzureLocalNodeId

const byte ParameterCode.AzureLocalNodeId = 209
static

(209) Internally used in case of hosting by Azure

◆ AzureMasterNodeId

const byte ParameterCode.AzureMasterNodeId = 208
static

(208) Internally used in case of hosting by Azure

◆ AzureNodeInfo

const byte ParameterCode.AzureNodeInfo = 210
static

(210) Internally used in case of hosting by Azure

◆ Broadcast

const byte ParameterCode.Broadcast = (byte)250
static

(250) Code for broadcast parameter of OpSetProperties method.

◆ Cache

const byte ParameterCode.Cache = (byte)247
static

(247) Code for caching events while raising them.

◆ CacheSliceIndex

const byte ParameterCode.CacheSliceIndex = 205
static

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

◆ CheckUserOnJoin

const byte ParameterCode.CheckUserOnJoin = (byte)232
static

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

◆ CleanupCacheOnLeave

const byte ParameterCode.CleanupCacheOnLeave = (byte)241
static

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

◆ ClientAuthenticationData

const byte ParameterCode.ClientAuthenticationData = 214
static

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

◆ ClientAuthenticationParams

const byte ParameterCode.ClientAuthenticationParams = 216
static

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

◆ ClientAuthenticationType

const byte ParameterCode.ClientAuthenticationType = 217
static

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

◆ Cluster

const byte ParameterCode.Cluster = 196
static

(196) Cluster info provided in OpAuthenticate/OpAuthenticateOnce responses.

◆ Code

const byte ParameterCode.Code = (byte)244
static

(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.

◆ CustomEventContent

const byte ParameterCode.CustomEventContent = (byte)245
static

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

◆ CustomInitData

const byte ParameterCode.CustomInitData = 194
static

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

◆ Data

const byte ParameterCode.Data = (byte)245
static

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

◆ EmptyRoomTTL

const byte ParameterCode.EmptyRoomTTL = 236
static

(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.

◆ EncryptionData

const byte ParameterCode.EncryptionData = 192
static

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

◆ EncryptionMode

const byte ParameterCode.EncryptionMode = 193
static

(193) How are we going to encrypt data.

◆ EventForward

const byte ParameterCode.EventForward = 234
static

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

◆ ExpectedProtocol

const byte ParameterCode.ExpectedProtocol = 195
static

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

◆ ExpectedValues

const byte ParameterCode.ExpectedValues = (byte)231
static

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

◆ FindFriendsOptions

const byte ParameterCode.FindFriendsOptions = 2
static

(2) Used in Op FindFriends request. An integer containing option-flags to filter the results.

◆ FindFriendsRequestList

const byte ParameterCode.FindFriendsRequestList = (byte)1
static

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

◆ FindFriendsResponseOnlineList

const byte ParameterCode.FindFriendsResponseOnlineList = (byte)1
static

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

◆ FindFriendsResponseRoomIdList

const byte ParameterCode.FindFriendsResponseRoomIdList = (byte)2
static

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

◆ GameCount

const byte ParameterCode.GameCount = 228
static

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

◆ GameList

const byte ParameterCode.GameList = 222
static

(222) List of RoomInfos about open / listed rooms

◆ GameProperties

const byte ParameterCode.GameProperties = (byte)248
static

(248) Code for property set (Hashtable).

◆ Group

const byte ParameterCode.Group = 240
static

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

◆ Info

const byte ParameterCode.Info = 218
static

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

◆ IsComingBack

const byte ParameterCode.IsComingBack = (byte)233
static

(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.

◆ IsInactive

const byte ParameterCode.IsInactive = (byte)233
static

(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.

◆ JoinMode

const byte ParameterCode.JoinMode = 215
static

(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.

◆ LobbyName

const byte ParameterCode.LobbyName = (byte)213
static

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

◆ LobbyStats

const byte ParameterCode.LobbyStats = (byte)211
static

(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

◆ LobbyType

const byte ParameterCode.LobbyType = (byte)212
static

(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.

◆ MasterClientId

const byte ParameterCode.MasterClientId = (byte)203
static

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

Tightly related to GamePropertyKey.MasterClientId.

◆ MasterPeerCount

const byte ParameterCode.MasterPeerCount = 227
static

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

◆ MatchMakingType

const byte ParameterCode.MatchMakingType = 223
static

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

◆ NickName

const byte ParameterCode.NickName = 202
static

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

◆ PeerCount

const byte ParameterCode.PeerCount = 229
static

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

◆ PlayerProperties

const byte ParameterCode.PlayerProperties = (byte)249
static

(249) Code for property set (Hashtable).

◆ PlayerTTL

const byte ParameterCode.PlayerTTL = 235
static

(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.

◆ PluginName

const byte ParameterCode.PluginName = 201
static

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

◆ Plugins

const byte ParameterCode.Plugins = 204
static

(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.

◆ PluginVersion

const byte ParameterCode.PluginVersion = 200
static

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

◆ Position

const byte ParameterCode.Position = 223
static

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

◆ Properties

const byte ParameterCode.Properties = (byte)251
static

(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.

◆ PublishUserId

const byte ParameterCode.PublishUserId = 239
static

(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.

◆ ReceiverGroup

const byte ParameterCode.ReceiverGroup = (byte)246
static

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

◆ Region

const byte ParameterCode.Region = (byte)210
static

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

◆ Remove

const byte ParameterCode.Remove = 239
static

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

◆ RoomName

const byte ParameterCode.RoomName = (byte)255
static

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

◆ RoomOptionFlags

const byte ParameterCode.RoomOptionFlags = 191
static

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

◆ Secret

const byte ParameterCode.Secret = 221
static

(221) Internally used to establish encryption

◆ SuppressRoomEvents

const byte ParameterCode.SuppressRoomEvents = 237
static

(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).

◆ TargetActorNr

const byte ParameterCode.TargetActorNr = (byte)253
static

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

◆ UriPath

const byte ParameterCode.UriPath = 209
static

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

◆ UserId

const byte ParameterCode.UserId = 225
static

(225) User's ID

◆ WebRpcParameters

const byte ParameterCode.WebRpcParameters = 208
static

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

◆ WebRpcReturnCode

const byte ParameterCode.WebRpcReturnCode = 207
static

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

◆ WebRpcReturnMessage

const byte ParameterCode.WebRpcReturnMessage = 206
static

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