Photon Bolt Engine API
Networking Middleware
Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
BoltRuntimeSettings Class Reference

The runtime settings and confugration for the current bolt simulation More...

Inheritance diagram for BoltRuntimeSettings:

Public Member Functions

BoltConfig GetConfigCopy ()
 Get a memberwise copy of the current bolt config More...
 

Public Attributes

int debugClientCount = 1
 The number of clients to start when launching a debug mode server (Pro-Only) More...
 
int debugStartPort = 54321
 The default debug start port More...
 
string debugStartMapName = null
 The scene to load after initializing bolt More...
 
bool debugPlayAsServer = false
 Whether to play as a server or not More...
 
bool showDebugInfo = true
 Whether to show debug info or not More...
 
bool overrideTimeScale = true
 Whether to show debug info or not More...
 
bool logUncaughtExceptions = false
 Whether to log uncaught exceptions More...
 
bool clientCanInstantiateAll = true
 Whehther the client has instantiate priviledges or not More...
 
BoltEditorStartMode debugEditorMode = BoltEditorStartMode.Server
 
KeyCode consoleToggleKey = KeyCode.Tab
 The keycode that will toggle visibility of the bolt console More...
 
bool consoleVisibleByDefault = true
 Whether the bolt console is initially visible or not More...
 
int compilationWarnLevel = 4
 
int editorSkin = 4
 
bool scopeModeHideWarningInGui = false
 
bool showHelpButtons = true
 
string masterServerGameId = ""
 
string masterServerEndPoint = "159.8.0.207:24000"
 
bool masterServerAutoConnect = false
 
bool masterServerAutoDisconnect = true
 
bool showBoltEntityHints = true
 
bool serializeProjectAsText = false
 
string photonAppId = ""
 Photon stuff. More...
 
bool photonUsePunch = false
 
int photonCloudRegionIndex = 0
 
bool photonUseOnPremise = false
 
string photonOnPremiseIpAddress = "127.0.0.1"
 

Static Public Attributes

static string[] photonCloudRegions = new[] {"eu", "us", "asia", "jp", "au", "usw", "sa", "cae", "kr", "@in"}
 

Properties

static BoltRuntimeSettings instance [get]
 A singleton static instance of the runtime settings More...
 

Detailed Description

The runtime settings and confugration for the current bolt simulation

Example: Using the settings instance to get a copy of the server config.

BoltConfig GetServerConfig() { return BoltRuntimeSettings.instance.GetConfigCopy(); }

Member Function Documentation

BoltConfig BoltRuntimeSettings.GetConfigCopy ( )
inline

Get a memberwise copy of the current bolt config

Returns
A bolt config

Example: Conditionally writing to the Unity console depending on the log target of the current config.

1 void WriteExtra(string message) {
2  BoltConfig config = BoltRuntimeSettings.instance.GetConfigCopy();
3 
4  if(config.logTargets == BoltConfigLogTargets.Unity) {
5  Debug.Log(message);
6  }
7 }

Member Data Documentation

bool BoltRuntimeSettings.clientCanInstantiateAll = true

Whehther the client has instantiate priviledges or not

int BoltRuntimeSettings.compilationWarnLevel = 4
KeyCode BoltRuntimeSettings.consoleToggleKey = KeyCode.Tab

The keycode that will toggle visibility of the bolt console

bool BoltRuntimeSettings.consoleVisibleByDefault = true

Whether the bolt console is initially visible or not

int BoltRuntimeSettings.debugClientCount = 1

The number of clients to start when launching a debug mode server (Pro-Only)

BoltEditorStartMode BoltRuntimeSettings.debugEditorMode = BoltEditorStartMode.Server
bool BoltRuntimeSettings.debugPlayAsServer = false

Whether to play as a server or not

string BoltRuntimeSettings.debugStartMapName = null

The scene to load after initializing bolt

int BoltRuntimeSettings.debugStartPort = 54321

The default debug start port

int BoltRuntimeSettings.editorSkin = 4
bool BoltRuntimeSettings.logUncaughtExceptions = false

Whether to log uncaught exceptions

bool BoltRuntimeSettings.masterServerAutoConnect = false
bool BoltRuntimeSettings.masterServerAutoDisconnect = true
string BoltRuntimeSettings.masterServerEndPoint = "159.8.0.207:24000"
string BoltRuntimeSettings.masterServerGameId = ""
bool BoltRuntimeSettings.overrideTimeScale = true

Whether to show debug info or not

string BoltRuntimeSettings.photonAppId = ""

Photon stuff.

int BoltRuntimeSettings.photonCloudRegionIndex = 0
string [] BoltRuntimeSettings.photonCloudRegions = new[] {"eu", "us", "asia", "jp", "au", "usw", "sa", "cae", "kr", "@in"}
static
string BoltRuntimeSettings.photonOnPremiseIpAddress = "127.0.0.1"
bool BoltRuntimeSettings.photonUseOnPremise = false
bool BoltRuntimeSettings.photonUsePunch = false
bool BoltRuntimeSettings.scopeModeHideWarningInGui = false
bool BoltRuntimeSettings.serializeProjectAsText = false
bool BoltRuntimeSettings.showBoltEntityHints = true
bool BoltRuntimeSettings.showDebugInfo = true

Whether to show debug info or not

bool BoltRuntimeSettings.showHelpButtons = true

Property Documentation

BoltRuntimeSettings BoltRuntimeSettings.instance
staticget

A singleton static instance of the runtime settings

Example: Using the runtime settings to create a button mapping to show the bolt console

void ConfigureDefault(GameButton button) { if(button = GameButton.ShowConsole) { buttonMap.Add(button, BoltRuntimeSettings.instance.consoleToggleKey); } }