Photon Unity Networking v1.101

Classes | Enumerations
LoadbalancingPeer.cs File Reference

Classes

class  LoadBalancingPeer
 A LoadbalancingPeer provides the operations and enum definitions needed to use the loadbalancing server application which is also used in Photon Cloud.
 
class  OpJoinRandomRoomParams
 
class  EnterRoomParams
 
class  ErrorCode
 ErrorCode defines the default codes associated with Photon client/server communication. More...
 
class  ActorProperties
 Class for constants. These (byte) values define "well known" properties for an Actor / Player. More...
 
class  GamePropertyKey
 Class for constants. These (byte) values are for "well known" room/game properties used in Photon Loadbalancing. More...
 
class  EventCode
 Class for constants. These values are for events defined by Photon Loadbalancing. More...
 
class  ParameterCode
 Class for constants. Codes for parameters of Operations and Events. More...
 
class  OperationCode
 Class for constants. Contains operation codes. Pun uses these constants internally. More...
 
class  RoomOptions
 Wraps up common room properties needed when you create rooms. Read the individual entries for more details. More...
 
class  RaiseEventOptions
 Aggregates several less-often used options for operation RaiseEvent. See field descriptions for usage details. More...
 
class  TypedLobby
 Refers to a specific lobby (and type) on the server. More...
 
class  TypedLobbyInfo
 
class  AuthenticationValues
 Container for user authentication in Photon. Set AuthValues before you connect - all else is handled. More...
 
class  FindFriendsOptions
 Options for OpFindFriends can be combined to filter which rooms of friends are returned. More...
 

Enumerations

enum  JoinMode : byte { JoinMode.Default = 0, JoinMode.CreateIfNotExists = 1, JoinMode.JoinOrRejoin = 2, JoinMode.RejoinOnly = 3 }
 Defines possible values for OpJoinRoom and OpJoinOrCreate. It tells the server if the room can be only be joined normally, created implicitly or found on a web-service for Turnbased games. More...
 
enum  MatchmakingMode : byte { MatchmakingMode.FillRoom = 0, MatchmakingMode.SerialMatching = 1, MatchmakingMode.RandomMatching = 2 }
 Options for matchmaking rules for OpJoinRandom. More...
 
enum  ReceiverGroup : byte { ReceiverGroup.Others = 0, ReceiverGroup.All = 1, ReceiverGroup.MasterClient = 2 }
 Lite - OpRaiseEvent lets you chose which actors in the room should receive events. By default, events are sent to "Others" but you can overrule this. More...
 
enum  EventCaching : byte {
  EventCaching.DoNotCache = 0, EventCaching.MergeCache = 1, EventCaching.ReplaceCache = 2, EventCaching.RemoveCache = 3,
  EventCaching.AddToRoomCache = 4, EventCaching.AddToRoomCacheGlobal = 5, EventCaching.RemoveFromRoomCache = 6, EventCaching.RemoveFromRoomCacheForActorsLeft = 7,
  EventCaching.SliceIncreaseIndex = 10, EventCaching.SliceSetIndex = 11, EventCaching.SlicePurgeIndex = 12, EventCaching.SlicePurgeUpToIndex = 13
}
 Lite - OpRaiseEvent allows you to cache events and automatically send them to joining players in a room. Events are cached per event code and player: Event 100 (example!) can be stored once per player. Cached events can be modified, replaced and removed. More...
 
enum  PropertyTypeFlag : byte { PropertyTypeFlag.None = 0x00, PropertyTypeFlag.Game = 0x01, PropertyTypeFlag.Actor = 0x02, PropertyTypeFlag.GameAndActor = Game | Actor }
 Flags for "types of properties", being used as filter in OpGetProperties. More...
 
enum  LobbyType : byte { LobbyType.Default = 0, LobbyType.SqlLobby = 2, LobbyType.AsyncRandomLobby = 3 }
 Options of lobby types available. Lobby types might be implemented in certain Photon versions and won't be available on older servers. More...
 
enum  AuthModeOption { AuthModeOption.Auth, AuthModeOption.AuthOnce, AuthModeOption.AuthOnceWss }
 Options for authentication modes. From "classic" auth on each server to AuthOnce (on NameServer). More...
 
enum  CustomAuthenticationType : byte {
  CustomAuthenticationType.Custom = 0, CustomAuthenticationType.Steam = 1, CustomAuthenticationType.Facebook = 2, CustomAuthenticationType.Oculus = 3,
  CustomAuthenticationType.PlayStation = 4, CustomAuthenticationType.Xbox = 5, CustomAuthenticationType.Viveport = 10, CustomAuthenticationType.NintendoSwitch = 11,
  CustomAuthenticationType.None = byte.MaxValue
}
 Options for optional "Custom Authentication" services used with Photon. Used by OpAuthenticate after connecting to Photon. More...
 

Enumeration Type Documentation

◆ AuthModeOption

enum AuthModeOption
strong

Options for authentication modes. From "classic" auth on each server to AuthOnce (on NameServer).

Enumerator
Auth 
AuthOnce 
AuthOnceWss 

◆ CustomAuthenticationType

enum CustomAuthenticationType : byte
strong

Options for optional "Custom Authentication" services used with Photon. Used by OpAuthenticate after connecting to Photon.

Enumerator
Custom 

Use a custom authentification service. Currently the only implemented option.

Steam 

Authenticates users by their Steam Account. Set auth values accordingly!

Facebook 

Authenticates users by their Facebook Account. Set auth values accordingly!

Oculus 

Authenticates users by their Oculus Account and token.

PlayStation 

Authenticates users by their PSN Account and token.

Xbox 

Authenticates users by their Xbox Account and XSTS token.

Viveport 

Authenticates users by their HTC VIVEPORT Account and user token. Set AuthGetParameters to "userToken=[userToken]"

NintendoSwitch 

Authenticates users by their NSA ID.

None 

Disables custom authentification. Same as not providing any AuthenticationValues for connect (more precisely for: OpAuthenticate).

◆ EventCaching

enum EventCaching : byte
strong

Lite - OpRaiseEvent allows you to cache events and automatically send them to joining players in a room. Events are cached per event code and player: Event 100 (example!) can be stored once per player. Cached events can be modified, replaced and removed.

Caching works only combination with ReceiverGroup options Others and All.

Enumerator
DoNotCache 

Default value (not sent).

MergeCache 

Will merge this event's keys with those already cached.

ReplaceCache 

Replaces the event cache for this eventCode with this event's content.

RemoveCache 

Removes this event (by eventCode) from the cache.

AddToRoomCache 

Adds an event to the room's cache

AddToRoomCacheGlobal 

Adds this event to the cache for actor 0 (becoming a "globally owned" event in the cache).

RemoveFromRoomCache 

Remove fitting event from the room's cache.

RemoveFromRoomCacheForActorsLeft 

Removes events of players who already left the room (cleaning up).

SliceIncreaseIndex 

Increase the index of the sliced cache.

SliceSetIndex 

Set the index of the sliced cache. You must set RaiseEventOptions.CacheSliceIndex for this.

SlicePurgeIndex 

Purge cache slice with index. Exactly one slice is removed from cache. You must set RaiseEventOptions.CacheSliceIndex for this.

SlicePurgeUpToIndex 

Purge cache slices with specified index and anything lower than that. You must set RaiseEventOptions.CacheSliceIndex for this.

◆ JoinMode

enum JoinMode : byte
strong

Defines possible values for OpJoinRoom and OpJoinOrCreate. It tells the server if the room can be only be joined normally, created implicitly or found on a web-service for Turnbased games.

These values are not directly used by a game but implicitly set.

Enumerator
Default 

Regular join. The room must exist.

CreateIfNotExists 

Join or create the room if it's not existing. Used for OpJoinOrCreate for example.

JoinOrRejoin 

The room might be out of memory and should be loaded (if possible) from a Turnbased web-service.

RejoinOnly 

Only re-join will be allowed. If the user is not yet in the room, this will fail.

◆ LobbyType

enum LobbyType : byte
strong

Options of lobby types available. Lobby types might be implemented in certain Photon versions and won't be available on older servers.

Enumerator
Default 

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 

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 

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.

◆ MatchmakingMode

enum MatchmakingMode : byte
strong

Options for matchmaking rules for OpJoinRandom.

Enumerator
FillRoom 

Fills up rooms (oldest first) to get players together as fast as possible. Default.

Makes most sense with MaxPlayers > 0 and games that can only start with more players.

SerialMatching 

Distributes players across available rooms sequentially but takes filter into account. Without filter, rooms get players evenly distributed.

RandomMatching 

Joins a (fully) random room. Expected properties must match but aside from this, any available room might be selected.

◆ PropertyTypeFlag

enum PropertyTypeFlag : byte
strong

Flags for "types of properties", being used as filter in OpGetProperties.

Enumerator
None 

(0x00) Flag type for no property type.

Game 

(0x01) Flag type for game-attached properties.

Actor 

(0x02) Flag type for actor related propeties.

GameAndActor 

(0x01) Flag type for game AND actor properties. Equal to 'Game'

◆ ReceiverGroup

enum ReceiverGroup : byte
strong

Lite - OpRaiseEvent lets you chose which actors in the room should receive events. By default, events are sent to "Others" but you can overrule this.

Enumerator
Others 

Default value (not sent). Anyone else gets my event.

All 

Everyone in the current room (including this peer) will get this event.

MasterClient 

The server sends this event only to the actor with the lowest actorNumber.

The "master client" does not have special rights but is the one who is in this room the longest time.