Photon Bolt Engine API  1.2.7
Public Member Functions | Public Attributes | Static Public Attributes | Properties | Private Attributes | Static Private Attributes | 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...
 
void UpdateBestRegion (PhotonRegion newRegion)
 

Public Attributes

int a2sServerPort = 21777
 
int compilationWarnLevel = 4
 
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 debugClientCount = 1
 The number of clients to start when launching a debug mode server More...
 
BoltEditorStartMode debugEditorMode = BoltEditorStartMode.Server
 
bool debugPlayAsServer = false
 Whether to play as a server or not More...
 
string debugStartMapName = null
 The scene to load after initializing bolt More...
 
int debugStartPort = 54321
 The default debug start port More...
 
int editorSkin = 4
 
bool enableA2sServer = true
 
bool enableClientMetrics = false
 
Bolt.QueryComponentOptionsGlobal globalEntityBehaviourQueryOption = Bolt.QueryComponentOptionsGlobal.ComponentsInChildren
 
Bolt.QueryComponentOptionsGlobal globalEntityPriorityCalculatorQueryOption = Bolt.QueryComponentOptionsGlobal.ComponentsInChildren
 
Bolt.QueryComponentOptionsGlobal globalEntityReplicationFilterQueryOption = Bolt.QueryComponentOptionsGlobal.ComponentsInChildren
 
BoltPrefabInstantiateMode instantiateMode
 
bool logUncaughtExceptions = false
 Whether to log uncaught exceptions More...
 
string masterServerGameId = ""
 
bool overrideTimeScale = true
 Whether to show debug info or not More...
 
string photonAppId = ""
 Photon stuff. More...
 
int photonCloudRegionIndex = 0
 
bool photonUsePunch = false
 
float RoomCreateTimeout = 10f
 
float RoomJoinTimeout = 10f
 
float RoomUpdateRate = 5f
 
bool scopeModeHideWarningInGui = false
 
bool serializeProjectAsText = false
 
bool showBoltEntityHints = true
 
bool showDebugInfo = true
 Whether to show debug info or not More...
 
bool showHelpButtons = true
 

Static Public Attributes

static string [] photonCloudRegions => (from region in PhotonRegion.regions.Values select region.ToString()).ToArray()
 
static string [] photonCloudRegionsId => (from region in PhotonRegion.regions.Values select region.Code).ToArray()
 

Properties

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

Private Attributes

internal BoltConfig _config = new BoltConfig()
 

Static Private Attributes

static BoltRuntimeSettings _instance
 

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

◆ GetConfigCopy()

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.

void WriteExtra(string message) {
if(config.logTargets == BoltConfigLogTargets.Unity) {
Debug.Log(message);
}
}

◆ UpdateBestRegion()

void BoltRuntimeSettings.UpdateBestRegion ( PhotonRegion  newRegion)
inline

Member Data Documentation

◆ _config

internal BoltConfig BoltRuntimeSettings._config = new BoltConfig()
private

◆ _instance

BoltRuntimeSettings BoltRuntimeSettings._instance
staticprivate

◆ a2sServerPort

int BoltRuntimeSettings.a2sServerPort = 21777

◆ compilationWarnLevel

int BoltRuntimeSettings.compilationWarnLevel = 4

◆ consoleToggleKey

KeyCode BoltRuntimeSettings.consoleToggleKey = KeyCode.Tab

The keycode that will toggle visibility of the bolt console

◆ consoleVisibleByDefault

bool BoltRuntimeSettings.consoleVisibleByDefault = true

Whether the bolt console is initially visible or not

◆ debugClientCount

int BoltRuntimeSettings.debugClientCount = 1

The number of clients to start when launching a debug mode server

◆ debugEditorMode

BoltEditorStartMode BoltRuntimeSettings.debugEditorMode = BoltEditorStartMode.Server

◆ debugPlayAsServer

bool BoltRuntimeSettings.debugPlayAsServer = false

Whether to play as a server or not

◆ debugStartMapName

string BoltRuntimeSettings.debugStartMapName = null

The scene to load after initializing bolt

◆ debugStartPort

int BoltRuntimeSettings.debugStartPort = 54321

The default debug start port

◆ editorSkin

int BoltRuntimeSettings.editorSkin = 4

◆ enableA2sServer

bool BoltRuntimeSettings.enableA2sServer = true

◆ enableClientMetrics

bool BoltRuntimeSettings.enableClientMetrics = false

◆ globalEntityBehaviourQueryOption

Bolt.QueryComponentOptionsGlobal BoltRuntimeSettings.globalEntityBehaviourQueryOption = Bolt.QueryComponentOptionsGlobal.ComponentsInChildren

◆ globalEntityPriorityCalculatorQueryOption

Bolt.QueryComponentOptionsGlobal BoltRuntimeSettings.globalEntityPriorityCalculatorQueryOption = Bolt.QueryComponentOptionsGlobal.ComponentsInChildren

◆ globalEntityReplicationFilterQueryOption

Bolt.QueryComponentOptionsGlobal BoltRuntimeSettings.globalEntityReplicationFilterQueryOption = Bolt.QueryComponentOptionsGlobal.ComponentsInChildren

◆ instantiateMode

BoltPrefabInstantiateMode BoltRuntimeSettings.instantiateMode

◆ logUncaughtExceptions

bool BoltRuntimeSettings.logUncaughtExceptions = false

Whether to log uncaught exceptions

◆ masterServerGameId

string BoltRuntimeSettings.masterServerGameId = ""

◆ overrideTimeScale

bool BoltRuntimeSettings.overrideTimeScale = true

Whether to show debug info or not

◆ photonAppId

string BoltRuntimeSettings.photonAppId = ""

Photon stuff.

◆ photonCloudRegionIndex

int BoltRuntimeSettings.photonCloudRegionIndex = 0

◆ photonCloudRegions

string [] BoltRuntimeSettings.photonCloudRegions => (from region in PhotonRegion.regions.Values select region.ToString()).ToArray()
static

◆ photonCloudRegionsId

string [] BoltRuntimeSettings.photonCloudRegionsId => (from region in PhotonRegion.regions.Values select region.Code).ToArray()
static

◆ photonUsePunch

bool BoltRuntimeSettings.photonUsePunch = false

◆ RoomCreateTimeout

float BoltRuntimeSettings.RoomCreateTimeout = 10f

◆ RoomJoinTimeout

float BoltRuntimeSettings.RoomJoinTimeout = 10f

◆ RoomUpdateRate

float BoltRuntimeSettings.RoomUpdateRate = 5f

◆ scopeModeHideWarningInGui

bool BoltRuntimeSettings.scopeModeHideWarningInGui = false

◆ serializeProjectAsText

bool BoltRuntimeSettings.serializeProjectAsText = false

◆ showBoltEntityHints

bool BoltRuntimeSettings.showBoltEntityHints = true

◆ showDebugInfo

bool BoltRuntimeSettings.showDebugInfo = true

Whether to show debug info or not

◆ showHelpButtons

bool BoltRuntimeSettings.showHelpButtons = true

Property Documentation

◆ instance

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); } }