Photon Unity Networking v1.101

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
ServerSettings Class Reference

Collection of connection-relevant settings, used internally by PhotonNetwork.ConnectUsingSettings. More...

Inherits ScriptableObject.

Public Types

enum  HostingOption {
  HostingOption.NotSet = 0, HostingOption.PhotonCloud = 1, HostingOption.SelfHosted = 2, HostingOption.OfflineMode = 3,
  HostingOption.BestRegion = 4
}
 

Public Member Functions

void UseCloudBestRegion (string cloudAppid)
 
void UseCloud (string cloudAppid)
 
void UseCloud (string cloudAppid, CloudRegionCode code)
 
void UseMyServer (string serverAddress, int serverPort, string application)
 
override string ToString ()
 

Static Public Member Functions

static bool IsAppId (string val)
 Checks if a string is a Guid by attempting to create one. More...
 
static void ResetBestRegionCodeInPreferences ()
 

Public Attributes

string AppID = ""
 
string VoiceAppID = ""
 
string ChatAppID = ""
 
HostingOption HostType = HostingOption.NotSet
 
CloudRegionCode PreferredRegion
 
CloudRegionFlag EnabledRegions = (CloudRegionFlag)(-1)
 
ConnectionProtocol Protocol = ConnectionProtocol.Udp
 
string ServerAddress = ""
 
int ServerPort = 5055
 
int VoiceServerPort = 5055
 
bool JoinLobby
 
bool EnableLobbyStatistics
 
PhotonLogLevel PunLogging = PhotonLogLevel.ErrorsOnly
 
DebugLevel NetworkLogging = DebugLevel.ERROR
 
bool RunInBackground = true
 
List< string > RpcList = new List<string>()
 
bool DisableAutoOpenWizard
 

Properties

static CloudRegionCode BestRegionCodeInPreferences [get]
 Gets the best region code in preferences. This composes the PhotonHandler, since its Internal and can not be accessed by the custom inspector More...
 

Detailed Description

Collection of connection-relevant settings, used internally by PhotonNetwork.ConnectUsingSettings.

Member Enumeration Documentation

◆ HostingOption

Enumerator
NotSet 
PhotonCloud 
SelfHosted 
OfflineMode 
BestRegion 

Member Function Documentation

◆ IsAppId()

static bool ServerSettings.IsAppId ( string  val)
static

Checks if a string is a Guid by attempting to create one.

Parameters
valThe potential guid to check.
Returns
True if new Guid(val) did not fail.

◆ ResetBestRegionCodeInPreferences()

static void ServerSettings.ResetBestRegionCodeInPreferences ( )
static

◆ ToString()

override string ServerSettings.ToString ( )

◆ UseCloud() [1/2]

void ServerSettings.UseCloud ( string  cloudAppid)

◆ UseCloud() [2/2]

void ServerSettings.UseCloud ( string  cloudAppid,
CloudRegionCode  code 
)

◆ UseCloudBestRegion()

void ServerSettings.UseCloudBestRegion ( string  cloudAppid)

◆ UseMyServer()

void ServerSettings.UseMyServer ( string  serverAddress,
int  serverPort,
string  application 
)

Member Data Documentation

◆ AppID

string ServerSettings.AppID = ""

◆ ChatAppID

string ServerSettings.ChatAppID = ""

◆ DisableAutoOpenWizard

bool ServerSettings.DisableAutoOpenWizard

◆ EnabledRegions

CloudRegionFlag ServerSettings.EnabledRegions = (CloudRegionFlag)(-1)

◆ EnableLobbyStatistics

bool ServerSettings.EnableLobbyStatistics

◆ HostType

HostingOption ServerSettings.HostType = HostingOption.NotSet

◆ JoinLobby

bool ServerSettings.JoinLobby

◆ NetworkLogging

DebugLevel ServerSettings.NetworkLogging = DebugLevel.ERROR

◆ PreferredRegion

CloudRegionCode ServerSettings.PreferredRegion

◆ Protocol

ConnectionProtocol ServerSettings.Protocol = ConnectionProtocol.Udp

◆ PunLogging

PhotonLogLevel ServerSettings.PunLogging = PhotonLogLevel.ErrorsOnly

◆ RpcList

List<string> ServerSettings.RpcList = new List<string>()

◆ RunInBackground

bool ServerSettings.RunInBackground = true

◆ ServerAddress

string ServerSettings.ServerAddress = ""

◆ ServerPort

int ServerSettings.ServerPort = 5055

◆ VoiceAppID

string ServerSettings.VoiceAppID = ""

◆ VoiceServerPort

int ServerSettings.VoiceServerPort = 5055

Property Documentation

◆ BestRegionCodeInPreferences

CloudRegionCode ServerSettings.BestRegionCodeInPreferences
staticget

Gets the best region code in preferences. This composes the PhotonHandler, since its Internal and can not be accessed by the custom inspector

The best region code in preferences.