Photon Quantum 3.0.0

Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Quantum.SimulationConfig Class Reference

The SimulationConfig holds parameters used in the ECS layer and inside core systems like physics and navigation. More...

Inheritance diagram for Quantum.SimulationConfig:
Quantum.AssetObject Quantum.ILogSource

Public Types

enum  AutoLoadSceneFromMapMode
 The scene load mode to use when changing Quantum maps. More...
 

Public Member Functions

override void Loaded (IResourceManager resourceManager, Native.Allocator allocator)
 The asset loaded callback, caches fixed calculation results. More...
 
- Public Member Functions inherited from Quantum.AssetObject
virtual void Disposed (IResourceManager resourceManager, Native.Allocator allocator)
 Called when the asset object is disposed. More...
 
virtual void Reset ()
 Resets the asset object. More...
 

Public Attributes

AutoLoadSceneFromMapMode AutoLoadSceneFromMap = AutoLoadSceneFromMapMode.UnloadPreviousSceneThenLoad
 This option will trigger a Unity scene load during the Quantum start sequence.
This might be convenient to start with but once the starting sequence is customized disable it and implement the scene loading by yourself. "Previous Scene" refers to a scene name in Quantum Map. More...
 
SimulationConfigChecksumErrorDumpOptions ChecksumErrorDumpOptions
 Additional options for checksum dumps, if the default settings don't provide a clear picture. More...
 
FP ChecksumSnapshotHistoryLengthSeconds = 3
 How long to store checksumed verified frames. The are used to generate a frame dump in case of a checksum error happening. Not used in Replay and Local mode. Default is 3. More...
 
SimulationUpdateTime DeltaTimeType = SimulationUpdateTime.Default
 Configure how the client tracks the time to progress the Quantum simulation from the QuantumRunner class. More...
 
FrameBase.EntitiesConfig Entities
 Global entities configuration More...
 
int HeapExtraCount = 0
 Sets extra heaps to allocate for a session in case you need to create 'auxiliary' frames than actually required for the simulation itself. Default is 0. More...
 
int HeapPageCount = 256
 Define the max heap page count for memory the frame class uses for custom allocations like QList for example. Default is 256. More...
 
int HeapPageShift = 15
 Define the max heap size for one page of memory the frame class uses for custom allocations like QList for example. The default is 15. More...
 
HeapTrackingMode HeapTrackingMode = HeapTrackingMode.DetectLeaks
 If and to which extent allocations in the Frame Heap should be tracked when in Debug mode. Recommended modes for development is DetectLeaks. While actively debugging a memory leak,TraceAllocations mode can be enabled (warning: tracing is very slow). More...
 
Navigation.Config Navigation
 Global navmesh configurations. More...
 
PhysicsCommon.Config Physics
 Global physics configurations. More...
 
int ThreadCount = 2
 Override the number of threads used internally. Default is 2. More...
 
- Public Attributes inherited from Quantum.AssetObject
AssetObjectIdentifier Identifier
 The identifier of the asset object. More...
 
AssetObject Settings => this
 Gets the asset object settings. More...
 

Static Public Attributes

const long DEFAULT_ID = (long)DefaultAssetGuids.SimulationConfig
 Obsolete: Don't use the hard coded guids instead reference the simulation config used in the RuntimeConfig. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Quantum.AssetObject
static AssetObject Create (Type t)
 Creates a new instance of the specified type. More...
 
static T Create< T > ()
 Creates a new instance of the specified type. More...
 
static T Create< T > (Action< T > init)
 Creates a new instance of the specified type and initializes it. More...
 
- Properties inherited from Quantum.AssetObject
AssetGuid Guid [get, set]
 The GUID of the asset object. More...
 
string Path [get, set]
 The path of the asset object. Optional. More...
 

Detailed Description

The SimulationConfig holds parameters used in the ECS layer and inside core systems like physics and navigation.

Member Enumeration Documentation

◆ AutoLoadSceneFromMapMode

The scene load mode to use when changing Quantum maps.

Will trigger for example for the initial map that is set in Quantum by RuntimeConfig.Map and on subsequent map changes.

The Unity scene referenced by Quantum.Map.Scene will be loaded.

Enumerator
Disabled 

Automatic scene loading disabled.

Legacy 

Obsolete: unused.

UnloadPreviousSceneThenLoad 

Unload the current scene then load the new scene.

LoadThenUnloadPreviousScene 

Load the new scene then unload the current scene.

Member Function Documentation

◆ Loaded()

override void Quantum.SimulationConfig.Loaded ( IResourceManager  resourceManager,
Native.Allocator  allocator 
)
inlinevirtual

The asset loaded callback, caches fixed calculation results.

Parameters
resourceManagerResource manager.
allocatorThe allocator.

Reimplemented from Quantum.AssetObject.

Member Data Documentation

◆ DEFAULT_ID

const long Quantum.SimulationConfig.DEFAULT_ID = (long)DefaultAssetGuids.SimulationConfig
static

Obsolete: Don't use the hard coded guids instead reference the simulation config used in the RuntimeConfig.

◆ Entities

FrameBase.EntitiesConfig Quantum.SimulationConfig.Entities

Global entities configuration

◆ Physics

PhysicsCommon.Config Quantum.SimulationConfig.Physics

Global physics configurations.

◆ Navigation

Navigation.Config Quantum.SimulationConfig.Navigation

Global navmesh configurations.

◆ AutoLoadSceneFromMap

AutoLoadSceneFromMapMode Quantum.SimulationConfig.AutoLoadSceneFromMap = AutoLoadSceneFromMapMode.UnloadPreviousSceneThenLoad

This option will trigger a Unity scene load during the Quantum start sequence.
This might be convenient to start with but once the starting sequence is customized disable it and implement the scene loading by yourself. "Previous Scene" refers to a scene name in Quantum Map.

◆ DeltaTimeType

SimulationUpdateTime Quantum.SimulationConfig.DeltaTimeType = SimulationUpdateTime.Default

Configure how the client tracks the time to progress the Quantum simulation from the QuantumRunner class.

◆ ThreadCount

int Quantum.SimulationConfig.ThreadCount = 2

Override the number of threads used internally. Default is 2.

◆ ChecksumSnapshotHistoryLengthSeconds

FP Quantum.SimulationConfig.ChecksumSnapshotHistoryLengthSeconds = 3

How long to store checksumed verified frames. The are used to generate a frame dump in case of a checksum error happening. Not used in Replay and Local mode. Default is 3.

◆ ChecksumErrorDumpOptions

SimulationConfigChecksumErrorDumpOptions Quantum.SimulationConfig.ChecksumErrorDumpOptions

Additional options for checksum dumps, if the default settings don't provide a clear picture.

◆ HeapTrackingMode

HeapTrackingMode Quantum.SimulationConfig.HeapTrackingMode = HeapTrackingMode.DetectLeaks

If and to which extent allocations in the Frame Heap should be tracked when in Debug mode. Recommended modes for development is DetectLeaks. While actively debugging a memory leak,TraceAllocations mode can be enabled (warning: tracing is very slow).

◆ HeapPageShift

int Quantum.SimulationConfig.HeapPageShift = 15

Define the max heap size for one page of memory the frame class uses for custom allocations like QList for example. The default is 15.

2^15 = 32.768 bytes

TotalHeapSizeInBytes = (1 << HeapPageShift) * HeapPageCount

◆ HeapPageCount

int Quantum.SimulationConfig.HeapPageCount = 256

Define the max heap page count for memory the frame class uses for custom allocations like QList for example. Default is 256.

TotalHeapSizeInBytes = (1 << HeapPageShift) * HeapPageCount

◆ HeapExtraCount

int Quantum.SimulationConfig.HeapExtraCount = 0

Sets extra heaps to allocate for a session in case you need to create 'auxiliary' frames than actually required for the simulation itself. Default is 0.

Quantum.SimulationConfig.HeapPageCount
int HeapPageCount
Define the max heap page count for memory the frame class uses for custom allocations like QList for ...
Definition: SimulationConfig.cs:120
Quantum.SimulationConfig.HeapPageShift
int HeapPageShift
Define the max heap size for one page of memory the frame class uses for custom allocations like QLis...
Definition: SimulationConfig.cs:113