Photon Fusion 2.0.4

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

Project configuration settings specific to how the Simulation class behaves. More...

Inherits IConfigurationSanityCheck.

Public Types

enum class  DataConsistency
 
enum class  InputTransferModes
 
enum class  SimulationTimeMode
 The time mode that the NetworkRunnerUpdaterDefault uses to calculate the delta time for the simulation update. More...
 

Public Member Functions

void SanityCheck ()
 

Public Attributes

bool HostMigration
 If, in host mode, we should allow host migration if the current host leaves. More...
 
int InputDataWordCount
 Input Data Word Count More...
 
InputTransferModes InputTransferMode
 The way which input is transferred More...
 
DataConsistency ObjectDataConsistency
 How the server chooses to send NetworkObject updates to balance consistency and bandwidth consumption. More...
 
int PlayerCount = 10
 The default number of players allowed to join a game instance. Can also be changed in code when starting Fusion. More...
 
NetworkProjectConfig.ReplicationFeatures ReplicationFeatures = NetworkProjectConfig.ReplicationFeatures.Scheduling
 Scheduling is the default. More...
 
SimulationTimeMode SimulationUpdateTimeMode = SimulationTimeMode.UnscaledDeltaTime
 The time mode that the Runner uses to update the simulation. More...
 
TickRate.Selection TickRateSelection = TickRate.Default
 The default tick rate to use. Can also be changed in code when starting Fusion. More...
 
Topologies Topology
 The topology used More...
 

Properties

bool AreaOfInterestEnabled [get]
 Signal if AOI is enabled More...
 
int InputTotalWordCount [get]
 
bool SchedulingEnabled [get]
 Signal if scheduling is enabled More...
 
bool SchedulingWithoutAOI [get]
 Signal if scheduling is running without AOI More...
 

Detailed Description

Project configuration settings specific to how the Simulation class behaves.

Member Enumeration Documentation

◆ DataConsistency

enum DataConsistency
strong

Enumerator
Full 

When a NetworkBehaviour's data changes, the server will send all properties whose changes have not been acknowledged.

This option consumes more bandwidth, but guarantees that each NetworkBehaviour has consistent state.

Eventual 

When a NetworkBehaviour's data changes, the server will only send the newly changed properties.

This option consumes less bandwidth, but a NetworkBehaviour may have inconsistent state at times (some properties up-to-date but not others).

◆ InputTransferModes

enum InputTransferModes
strong

Enumerator
Redundancy 

Send delta compressed and redundant input, used for most games

RedundancyUncompressed 

Send redundant input, use for games with small input structs (like fps games) and high player count

LatestState 

Only send latest input state, useful for VR, etc.

◆ SimulationTimeMode

enum SimulationTimeMode
strong

The time mode that the NetworkRunnerUpdaterDefault uses to calculate the delta time for the simulation update.

Enumerator
UnscaledDeltaTime 

Use Time.UnscaledDeltaTime. Time is not affected by timescale and keeps running when the editor is paused.

DeltaTime 

Use Time.DeltaTime. Only for GameMode.Single. Can be used to allow for timescale changes in gameplay or to pause the game and continue without interruption when stopping at a debug breakpoint.

Member Data Documentation

◆ HostMigration

bool HostMigration

If, in host mode, we should allow host migration if the current host leaves.

◆ InputDataWordCount

int InputDataWordCount

Input Data Word Count

◆ InputTransferMode

InputTransferModes InputTransferMode

The way which input is transferred

◆ ObjectDataConsistency

DataConsistency ObjectDataConsistency

How the server chooses to send NetworkObject updates to balance consistency and bandwidth consumption.

◆ PlayerCount

int PlayerCount = 10

The default number of players allowed to join a game instance. Can also be changed in code when starting Fusion.

◆ ReplicationFeatures

Scheduling is the default.

◆ SimulationUpdateTimeMode

The time mode that the Runner uses to update the simulation.

-

◆ TickRateSelection

TickRate.Selection TickRateSelection = TickRate.Default

The default tick rate to use. Can also be changed in code when starting Fusion.

◆ Topology

Topologies Topology

The topology used

Property Documentation

◆ AreaOfInterestEnabled

bool AreaOfInterestEnabled
get

Signal if AOI is enabled

◆ InputTotalWordCount

int InputTotalWordCount
get

◆ SchedulingEnabled

bool SchedulingEnabled
get

Signal if scheduling is enabled

◆ SchedulingWithoutAOI

bool SchedulingWithoutAOI
get

Signal if scheduling is running without AOI