Quantum 3
3.1.0
Settings for Photon application(s) and the server to connect to. More...
Public Member Functions | |
| AppSettings () | |
| Creates an AppSettings instance with default values. More... | |
| AppSettings (AppSettings original=null) | |
| Initializes the AppSettings with default values or the provided original. More... | |
| ClientAppType | ClientTypeDetect () |
| Tries to detect the ClientAppType, based on which AppId values are present. Can detect Realtime, Fusion or Quantum. Used when the RealtimeClient.ClientType is set to detect. More... | |
| AppSettings | CopyTo (AppSettings target) |
| Copies values of this instance to the target. More... | |
| string | GetAppId (ClientAppType ct) |
| Gets the AppId for a specific type of client. More... | |
| string | ToStringFull () |
| ToString but with more details. More... | |
Static Public Member Functions | |
| static bool | IsAppId (string val) |
| Checks if a string is a Guid by attempting to create one. More... | |
Public Attributes | |
| string | AppIdChat |
| AppId for Photon Chat. More... | |
| string | AppIdFusion |
| AppId for Photon Fusion. More... | |
| string | AppIdQuantum |
| AppId for Photon Quantum. More... | |
| string | AppIdRealtime |
| AppId for Realtime or PUN. More... | |
| string | AppIdVideo |
| AppId for Photon Video. More... | |
| string | AppIdVoice |
| AppId for Photon Voice. More... | |
| string | AppVersion |
| The AppVersion can be used to identify builds and will split the AppId distinct "Virtual AppIds" (important for matchmaking). More... | |
| AuthModeOption | AuthMode = AuthModeOption.AuthOnceWss |
| Defines how authentication is done. On each system, once or once via a WSS connection (safe). More... | |
| string | BestRegionSummaryFromStorage |
| Set to a previous BestRegionSummary value before connecting. More... | |
| LogLevel | ClientLogging = LogLevel.Warning |
| Log level for the RealtimeClient and callbacks. Useful to get info about the client state, servers it uses and operations called. More... | |
| bool | EnableLobbyStatistics |
| If true, the Master Server will send statistics for currently used lobbies. Defaults to false. More... | |
| bool | EnableProtocolFallback = true |
| Enables the fallback to WSS, should the initial connect to the Name Server fail. Some exceptions apply. More... | |
| string | FixedRegion |
| Can be set to any of the Photon Cloud's region names to directly connect to that region. More... | |
| LogLevel | NetworkLogging = LogLevel.Error |
| Log level for the PhotonPeer and connection. Useful to debug connection related issues. More... | |
| ushort | Port |
| If not null, this sets the port of the first Photon server to connect to (that will "forward" the client as needed). More... | |
| ConnectionProtocol | Protocol = ConnectionProtocol.Udp |
| The network level protocol to use. More... | |
| string | ProxyServer |
| Defines a proxy URL for WebSocket connections. Can be the proxy or point to a .pac file. More... | |
| string | Server |
| The address (hostname or IP) of the server to connect to. More... | |
| bool | UseNameServer = true |
| If false, the app will attempt to connect to a Master Server (which is obsolete but sometimes still necessary). More... | |
Properties | |
| string? | AppIdVoiceOrVideo [get] |
| Gets either the AppIdVoice or the AppIdVideo for convenient use in either SDK. More... | |
| bool | IsBestRegion [get] |
| If true, the client should fetch the region list from the Name Server and find the one with best ping. More... | |
| bool | IsDefaultNameServer [get] |
| If true, the default nameserver address for the Photon Cloud should be used. More... | |
| bool | IsDefaultPort [get] |
| If true, the default ports for a protocol will be used. More... | |
| bool | IsMasterServerAddress [get] |
| If true, the Server field contains a Master Server address (if any address at all). More... | |
Settings for Photon application(s) and the server to connect to.
This is Serializable for Unity, so it can be included in ScriptableObject instances.
|
inline |
Creates an AppSettings instance with default values.
|
inline |
Initializes the AppSettings with default values or the provided original.
| original | If non-null, all values are copied from the original. |
|
inline |
Gets the AppId for a specific type of client.
Components that can work for the Voice SDK or the Video SDK can use ClientAppType.VoiceOrVideo. It returns AppIdVoiceOrVideo.
|
inline |
Tries to detect the ClientAppType, based on which AppId values are present. Can detect Realtime, Fusion or Quantum. Used when the RealtimeClient.ClientType is set to detect.
|
inline |
ToString but with more details.
|
inlinestatic |
Checks if a string is a Guid by attempting to create one.
| val | The potential guid to check. |
|
inline |
Copies values of this instance to the target.
| target | Target instance. |
| string Photon.Realtime.AppSettings.AppIdRealtime |
AppId for Realtime or PUN.
| string Photon.Realtime.AppSettings.AppIdFusion |
AppId for Photon Fusion.
| string Photon.Realtime.AppSettings.AppIdQuantum |
AppId for Photon Quantum.
| string Photon.Realtime.AppSettings.AppIdChat |
AppId for Photon Chat.
| string Photon.Realtime.AppSettings.AppIdVoice |
AppId for Photon Voice.
| string Photon.Realtime.AppSettings.AppIdVideo |
AppId for Photon Video.
Photon Video is a separate SDK and AppId-type. Components that work for Voice and Video alike can use AppIdVoiceOrVideo.
| string Photon.Realtime.AppSettings.AppVersion |
The AppVersion can be used to identify builds and will split the AppId distinct "Virtual AppIds" (important for matchmaking).
| bool Photon.Realtime.AppSettings.UseNameServer = true |
If false, the app will attempt to connect to a Master Server (which is obsolete but sometimes still necessary).
if true, Server points to a NameServer (or is null, using the default), else it points to a MasterServer.
| string Photon.Realtime.AppSettings.FixedRegion |
Can be set to any of the Photon Cloud's region names to directly connect to that region.
if this IsNullOrEmpty() AND UseNameServer == true, use BestRegion. else, use a server
| string Photon.Realtime.AppSettings.BestRegionSummaryFromStorage |
Set to a previous BestRegionSummary value before connecting.
This is a value used when the client connects to the "Best Region".
If this is null or empty, all regions gets pinged. Providing a previous summary on connect, speeds up best region selection and makes the previously selected region "sticky".
Unity clients should store the BestRegionSummary in the PlayerPrefs. You can store the new result by implementing IConnectionCallbacks.OnConnectedToMaster. If RealtimeClient.SummaryToCache is not null, store this string. To avoid storing the value multiple times, you could set SummaryToCache to null.
| string Photon.Realtime.AppSettings.Server |
The address (hostname or IP) of the server to connect to.
| ushort Photon.Realtime.AppSettings.Port |
If not null, this sets the port of the first Photon server to connect to (that will "forward" the client as needed).
| string Photon.Realtime.AppSettings.ProxyServer |
Defines a proxy URL for WebSocket connections. Can be the proxy or point to a .pac file.
This URL supports various definitions:
"user:pass@proxyaddress:port"
"proxyaddress:port"
"system:"
"pac:"
"pac:http://host/path/pacfile.pac"
Important: Don't define a protocol, except to point to a pac file. The proxy address should not begin with http:// or https://.
| ConnectionProtocol Photon.Realtime.AppSettings.Protocol = ConnectionProtocol.Udp |
The network level protocol to use.
| bool Photon.Realtime.AppSettings.EnableProtocolFallback = true |
Enables the fallback to WSS, should the initial connect to the Name Server fail. Some exceptions apply.
For security reasons, a fallback to another protocol is not done when using WSS or AuthMode.AuthOnceWss. That would compromise the expected security.
If the fallback is impossible or if that connection also fails, the app logic must handle the case. It might even make sense to just try the same connection settings once more (or ask the user to do something about the network connectivity, firewalls, etc).
The fallback will use the default Name Server port as defined by ProtocolToNameServerPort.
| AuthModeOption Photon.Realtime.AppSettings.AuthMode = AuthModeOption.AuthOnceWss |
Defines how authentication is done. On each system, once or once via a WSS connection (safe).
| bool Photon.Realtime.AppSettings.EnableLobbyStatistics |
If true, the Master Server will send statistics for currently used lobbies. Defaults to false.
The lobby statistics can be useful if your title dynamically uses lobbies, depending (e.g.) on current player activity or such. The provided list of stats is capped to 500.
Changing the value while being connected has no immediate effect. Set this before connecting.
Implement ILobbyCallbacks.OnLobbyStatisticsUpdate to get the list of used lobbies.
| LogLevel Photon.Realtime.AppSettings.NetworkLogging = LogLevel.Error |
Log level for the PhotonPeer and connection. Useful to debug connection related issues.
| LogLevel Photon.Realtime.AppSettings.ClientLogging = LogLevel.Warning |
Log level for the RealtimeClient and callbacks. Useful to get info about the client state, servers it uses and operations called.
|
get |
Gets either the AppIdVoice or the AppIdVideo for convenient use in either SDK.
If the Video SDK is enabled, AppIdVideo is preferred. If that is empty, AppIdVoice is returned.
|
get |
If true, the Server field contains a Master Server address (if any address at all).
|
get |
If true, the client should fetch the region list from the Name Server and find the one with best ping.
See "Best Region" in the online docs.
|
get |
If true, the default nameserver address for the Photon Cloud should be used.
|
get |
If true, the default ports for a protocol will be used.