Photon Bolt Engine API 1.3

Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
Photon.Bolt.BoltRuntimeSettings Class Reference

The Runtime Settings and Confugration for the current Bolt simulation More...

Inheritance diagram for Photon.Bolt.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
 A2S Server Port More...
 
int compilationWarnLevel = 4
 Warning Level when building the Debug Start standalone clients More...
 
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 debugBuildMode = 1
 Describe how the Debug Start will build the Standalone instances More...
 
int debugClientCount = 1
 The number of clients to start when launching a debug mode server More...
 
BoltEditorStartMode debugEditorMode = BoltEditorStartMode.Server
 Editor mode when running using Debug Start More...
 
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
 Enable A2S Server More...
 
bool enableClientMetrics = false
 Enable the Client Connection metrics More...
 
bool enableSourceProvider = false
 Enable Bolt integration with Source Providers, such as Perforce More...
 
QueryComponentOptionsGlobal globalEntityBehaviourQueryOption = QueryComponentOptionsGlobal.ComponentsInChildren
 Entity Behaviour Query Option More...
 
QueryComponentOptionsGlobal globalEntityPriorityCalculatorQueryOption = QueryComponentOptionsGlobal.ComponentsInChildren
 Entity PriorityCalculator Query Option More...
 
QueryComponentOptionsGlobal globalEntityReplicationFilterQueryOption = QueryComponentOptionsGlobal.ComponentsInChildren
 Entity ReplicationFilter Query Option More...
 
BoltPrefabInstantiateMode instantiateMode
 Bolt Entity Prefabs Instantiation Mode More...
 
bool overrideTimeScale = true
 Whether to show debug info or not More...
 
string photonAppId = ""
 Photon Application ID More...
 
int photonCloudRegionIndex = 0
 Current Selected Photon Region More...
 
bool photonUsePunch = false
 Enable NAT Punchthrough More...
 
float RoomCreateTimeout = 10f
 Timeout for Photon Sessions Creation More...
 
float RoomJoinTimeout = 10f
 Timeout to Join a Photon Session More...
 
bool scopeModeHideWarningInGui = false
 Flag to signal if Warning of Manual Scoping should be hidden More...
 
bool serializeProjectAsText = false
 Serialize project as Text or Binary More...
 
bool showBoltEntityHints = true
 Show Help Hints on Bolt Entities More...
 
bool showDebugInfo = true
 Whether to show debug info or not More...
 

Static Public Attributes

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

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

◆ GetConfigCopy()

BoltConfig Photon.Bolt.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) {
BoltConfig config = BoltRuntimeSettings.instance.GetConfigCopy();
if(config.logTargets == BoltConfigLogTargets.Unity) {
Debug.Log(message);
}
}

◆ UpdateBestRegion()

void Photon.Bolt.BoltRuntimeSettings.UpdateBestRegion ( PhotonRegion  newRegion)
inline

Member Data Documentation

◆ a2sServerPort

int Photon.Bolt.BoltRuntimeSettings.a2sServerPort = 21777

A2S Server Port

◆ compilationWarnLevel

int Photon.Bolt.BoltRuntimeSettings.compilationWarnLevel = 4

Warning Level when building the Debug Start standalone clients

◆ consoleToggleKey

KeyCode Photon.Bolt.BoltRuntimeSettings.consoleToggleKey = KeyCode.Tab

The keycode that will toggle visibility of the bolt console

◆ consoleVisibleByDefault

bool Photon.Bolt.BoltRuntimeSettings.consoleVisibleByDefault = true

Whether the bolt console is initially visible or not

◆ debugBuildMode

int Photon.Bolt.BoltRuntimeSettings.debugBuildMode = 1

Describe how the Debug Start will build the Standalone instances

◆ debugClientCount

int Photon.Bolt.BoltRuntimeSettings.debugClientCount = 1

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

◆ debugEditorMode

BoltEditorStartMode Photon.Bolt.BoltRuntimeSettings.debugEditorMode = BoltEditorStartMode.Server

Editor mode when running using Debug Start

◆ debugPlayAsServer

bool Photon.Bolt.BoltRuntimeSettings.debugPlayAsServer = false

Whether to play as a server or not

◆ debugStartMapName

string Photon.Bolt.BoltRuntimeSettings.debugStartMapName = null

The scene to load after initializing bolt

◆ debugStartPort

int Photon.Bolt.BoltRuntimeSettings.debugStartPort = 54321

The default debug start port

◆ editorSkin

int Photon.Bolt.BoltRuntimeSettings.editorSkin = 4

◆ enableA2sServer

bool Photon.Bolt.BoltRuntimeSettings.enableA2sServer = true

Enable A2S Server

◆ enableClientMetrics

bool Photon.Bolt.BoltRuntimeSettings.enableClientMetrics = false

Enable the Client Connection metrics

◆ enableSourceProvider

bool Photon.Bolt.BoltRuntimeSettings.enableSourceProvider = false

Enable Bolt integration with Source Providers, such as Perforce

◆ globalEntityBehaviourQueryOption

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

Entity Behaviour Query Option

◆ globalEntityPriorityCalculatorQueryOption

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

Entity PriorityCalculator Query Option

◆ globalEntityReplicationFilterQueryOption

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

Entity ReplicationFilter Query Option

◆ instantiateMode

BoltPrefabInstantiateMode Photon.Bolt.BoltRuntimeSettings.instantiateMode

Bolt Entity Prefabs Instantiation Mode

◆ overrideTimeScale

bool Photon.Bolt.BoltRuntimeSettings.overrideTimeScale = true

Whether to show debug info or not

◆ photonAppId

string Photon.Bolt.BoltRuntimeSettings.photonAppId = ""

Photon Application ID

◆ photonCloudRegionIndex

int Photon.Bolt.BoltRuntimeSettings.photonCloudRegionIndex = 0

Current Selected Photon Region

◆ photonCloudRegions

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

Photon Region List

◆ photonCloudRegionsId

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

Photon Region Code List

◆ photonUsePunch

bool Photon.Bolt.BoltRuntimeSettings.photonUsePunch = false

Enable NAT Punchthrough

◆ RoomCreateTimeout

float Photon.Bolt.BoltRuntimeSettings.RoomCreateTimeout = 10f

Timeout for Photon Sessions Creation

◆ RoomJoinTimeout

float Photon.Bolt.BoltRuntimeSettings.RoomJoinTimeout = 10f

Timeout to Join a Photon Session

◆ scopeModeHideWarningInGui

bool Photon.Bolt.BoltRuntimeSettings.scopeModeHideWarningInGui = false

Flag to signal if Warning of Manual Scoping should be hidden

◆ serializeProjectAsText

bool Photon.Bolt.BoltRuntimeSettings.serializeProjectAsText = false

Serialize project as Text or Binary

Deprecated:

◆ showBoltEntityHints

bool Photon.Bolt.BoltRuntimeSettings.showBoltEntityHints = true

Show Help Hints on Bolt Entities

◆ showDebugInfo

bool Photon.Bolt.BoltRuntimeSettings.showDebugInfo = true

Whether to show debug info or not

Property Documentation

◆ instance

BoltRuntimeSettings Photon.Bolt.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); } }

Photon.Bolt.BoltConfigLogTargets
BoltConfigLogTargets
The target output of bolt logging
Definition: BoltConfig.cs:97