Photon Load Balancing API Constants
Members
(static, readonly) CustomAuthenticationType
Options for optional "Custom Authentication" services used with Photon.
Properties:
Name | Type | Description |
---|---|---|
Custom |
number | Default. Use a custom authentification service. |
Steam |
number | Authenticates users by their Steam Account. Set Steam's ticket as "ticket" via "authParameters" of setCustomAuthentication(). |
Facebook |
number | Authenticates users by their Facebook Account. Set Facebooks's tocken as "token" via "authParameters" of setCustomAuthentication(). |
Oculus |
number | Authenticates users by their Oculus Account and token. Set Oculus' userid as "userid" and nonce as "nonce" via "authParameters" of setCustomAuthentication(). |
PlayStation4 |
number | Authenticates users by their PSN Account and token on PS4. Set token as "token", env as "env" and userName as "userName" via "authParameters" of setCustomAuthentication(). |
Xbox |
number | Authenticates users by their Xbox Account. Pass the XSTS token via "authData" parameter of setCustomAuthentication(). |
Viveport |
number | Authenticates users by their HTC Viveport Account. Set userToken as "userToken" via "authParameters" of setCustomAuthentication(). |
NintendoSwitch |
number | Authenticates users by their NSA ID. Set token as "token" and appversion as "appversion" via "authParameters" of setCustomAuthentication(). The appversion is optional. |
PlayStation5 |
number | Authenticates users by their PSN Account and token on PS5. Set token as "token", env as "env" and userName as "userName" via "authParameters" of setCustomAuthentication(). |
Epic |
number | Authenticates users with Epic Online Services (EOS). Set token as "token" and ownershipToken as "ownershipToken" via "authParameters" of setCustomAuthentication(). The ownershipToken is optional. |
FacebookGaming |
number | Authenticates users with Facebook Gaming api. Set token as "token" via "authParameters" of setCustomAuthentication(). |
None |
number | Disables custom authentification. |
(static, readonly) ErrorCode
Master and Game servers error codes.
Properties:
Name | Type | Description |
---|---|---|
Ok |
number | No Error. |
OperationNotAllowedInCurrentState |
number | Operation can't be executed yet. |
InvalidOperationCode |
number | The operation you called is not implemented on the server (application) you connect to. Make sure you run the fitting applications. |
InternalServerError |
number | Something went wrong in the server. Try to reproduce and contact Exit Games. |
InvalidAuthentication |
number | Authentication failed. Possible cause: AppId is unknown to Photon (in cloud service). |
GameIdAlreadyExists |
number | GameId (name) already in use (can't create another). Change name. |
GameFull |
number | Game is full. This can when players took over while you joined the game. |
GameClosed |
number | Game is closed and can't be joined. Join another game. |
ServerFull |
number | All servers are busy. This is a temporary issue and the game logic should try again after a brief wait time. |
UserBlocked |
number | Not in use currently. |
NoRandomMatchFound |
number | Random matchmaking only succeeds if a room exists thats neither closed nor full. Repeat in a few seconds or create a new room. |
GameDoesNotExist |
number | Join can fail if the room (name) is not existing (anymore). This can happen when players leave while you join. |
MaxCcuReached |
number | Authorization on the Photon Cloud failed becaus the concurrent users (CCU) limit of the app's subscription is reached. |
InvalidRegion |
number | Authorization on the Photon Cloud failed because the app's subscription does not allow to use a particular region's server. |
CustomAuthenticationFailed |
number | Custom Authentication of the user failed due to setup reasons (see Cloud Dashboard) or the provided user data (like username or token). Check error message for details. |
AuthenticationTicketExpired |
number | The Authentication ticket expired. Usually, this is refreshed behind the scenes. Connect (and authorize) again. |
PluginReportedError |
number | A server-side plugin (or webhook) failed to execute and reported an error. Check the OperationResponse.DebugMessage. |
PluginMismatch |
number | CreateGame/JoinGame/Join operation fails if expected plugin does not correspond to loaded one. |
JoinFailedPeerAlreadyJoined |
number | For join requests. Indicates the current peer already called join and is joined to the room. |
JoinFailedFoundInactiveJoiner |
number | For join requests. Indicates the list of InactiveActors already contains an actor with the requested ActorNr or UserId. |
JoinFailedWithRejoinerNotFound |
number | For join requests. Indicates the list of Actors (active and inactive) did not contain an actor with the requested ActorNr or UserId. |
JoinFailedFoundExcludedUserId |
number | For join requests. Note: for future use - Indicates the requested UserId was found in the ExcludedList. |
JoinFailedFoundActiveJoiner |
number | For join requests. Indicates the list of ActiveActors already contains an actor with the requested ActorNr or UserId. |
HttpLimitReached |
number | For SetProerties and Raisevent (if flag HttpForward is true) requests. Indicates the maximum allowed http requests per minute was reached. |
ExternalHttpCallFailed |
number | For WebRpc requests. Indicates the the call to the external service failed. |
OperationLimitReached |
number | For operations with defined limits (as in calls per second, content count or size) |
SlotErrorServer |
number | Error during matchmaking with slot reservation. E.g. the reserved slots can not exceed MaxPlayers. |
InvalidEncryptionParameters |
number | Server will react with this error if invalid encryption parameters provided by token |
(static, readonly) EventCaching
Caching options for events.
Properties:
Name | Type | Description |
---|---|---|
DoNotCache |
number | Default. Do not cache. |
MergeCache |
number | Will merge this event's keys with those already cached. |
ReplaceCache |
number | Replaces the event cache for this eventCode with this event's content. |
RemoveCache |
number | Removes this event (by eventCode) from the cache. |
AddToRoomCache |
number | Adds an event to the room's cache. |
AddToRoomCacheGlobal |
number | Adds this event to the cache for actor 0 (becoming a "globally owned" event in the cache). |
RemoveFromRoomCache |
number | Remove fitting event from the room's cache. |
RemoveFromRoomCacheForActorsLeft |
number | Removes events of players who already left the room (cleaning up). |
(static, readonly) LobbyType
Options of lobby types available. Lobby types might be implemented in certain Photon versions and won't be available on older servers.
Properties:
Name | Type | Description |
---|---|---|
Default |
number | This lobby is used unless another is defined by game or JoinRandom. Room-lists will be sent and JoinRandomRoom can filter by matching properties. |
SqlLobby |
number | This lobby type lists rooms like Default but JoinRandom has a parameter for SQL-like "where" clauses for filtering. This allows bigger, less, or and and combinations. |
AsyncRandomLobby |
number | This lobby does not send lists of games. It is only used for OpJoinRandomRoom. It keeps rooms available for a while when there are only inactive users left. |
(static, readonly) MatchmakingMode
Options for matchmaking rules for joinRandomGame.
Properties:
Name | Type | Description |
---|---|---|
FillRoom |
number | Default. FillRoom Fills up rooms (oldest first) to get players together as fast as possible. Makes most sense with MaxPlayers > 0 and games that can only start with more players. |
SerialMatching |
number | Distributes players across available rooms sequentially but takes filter into account. Without filter, rooms get players evenly distributed. |
RandomMatching |
number | Joins a (fully) random room. Expected properties must match but aside from this, any available room might be selected. |
(static, readonly) OperationCode
Codes for parameters and events used in Photon Load Balancing API.
Properties:
Name | Type | Description |
---|---|---|
Authenticate |
number | Authenticates this peer and connects to a virtual application. |
JoinLobby |
number | Joins lobby (on Master). |
LeaveLobby |
number | Leaves lobby (on Master). |
CreateGame |
number | Creates a game (or fails if name exists). |
JoinGame |
number | Joins room (by name). |
JoinRandomGame |
number | Joins random room (on Master). |
Leave |
number | Leaves the room. |
RaiseEvent |
number | Raises event (in a room, for other actors/players). |
SetProperties |
number | Sets Properties (of room or actor/player). |
GetProperties |
number | Gets Properties. |
ChangeGroups |
number | Changes interest groups in room. |
FindFriends |
number | Requests Master server for actors online status and joined rooms. |
LobbyStats |
number | Requests Master server for lobbies statistics. |
GetRegions |
number | Gets list of regional servers from a NameServer. |
Rpc |
number | Rpc operation. |
(static, readonly) ReceiverGroup
Options for choosing room's actors who should receive events.
Properties:
Name | Type | Description |
---|---|---|
Others |
number | Default. Anyone else gets my event. |
All |
number | Everyone in the current room (including this peer) will get this event. |
MasterClient |
number | The "master client" does not have special rights but is the one who is in this room the longest time. |