Photon Fusion 1.1.9

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

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

Public Types

enum  StateReplicationModes
 Enumerates the types of state replication available. More...
 
enum  Topologies
 

Public Attributes

int ClientPacketInterval = 1
 This value times TickRate determines the network send rate for clients. A value of 1 instructs clients to send input/state updates to the server every simulation tick. Values greater than 1 will send an update every N ticks. Higher values reduce data usage, in exchange for increased latency and reduced state sync accuracy.
 
int DefaultPlayers = 10
 The default number of players allowed to join a game instance. Can also be changed in code when starting Fusion.
 
bool HostMigration
 If, in host mode, we should allow host migration if the current host leaves.
 
int InputDataWordCount
 
int MaxPrediction = 60
 The max amount of predicted ticks on a client in server or host mode, if this is overstepped on client a hard reset will be done on client to bring it down to correct prediction .
 
bool ObjectInterest
 Selects if Object Interest should be used when running in StateReplicationModes.EventualConsistency mode. When enabled, clients will only receive updates for objects which they have interest in. How interest is determined for each NetworkObject is based on its NetworkObject.ObjectInterest mode setting.
 
StateReplicationModes ReplicationMode
 Determines which StateReplicationModes mode will be used.
 
int ServerPacketInterval = 1
 This value times TickRate determines the network send rate for the server. A value of 1 instructs the server to send state updates to clients every simulation tick. Values greater than 1 will send a input/state updates every N ticks. Higher values reduce data usage, in exchange for increased latency and reduced state sync accuracy.
 
int TickRate = 60
 The update rate of the simulation in Hz (ticks per second).
 
Topologies Topology
 The topology used.
 

Properties

double ClientPacketDeltaTime [get]
 Returns (ClientPacketInterval * DeltaTime). This is the effective time interval (in seconds) between client input/state updates from the client.
 
double DeltaTime [get]
 Returns the inverse of TickRate. The time (in seconds) between simulation ticks.
 
int InputTotalWordCount [get]
 
double ServerDeltaTime [get]
 Returns (DeltaTime * ServerTickMultiplier).
 
double ServerPacketDeltaTime [get]
 Returns (ServerPacketInterval * ServerDeltaTime). This is the effective time interval (in seconds) between server tick updates to clients.
 

Detailed Description

Project configuration settings specific to how the Simulation class behaves.

Member Enumeration Documentation

◆ StateReplicationModes

Enumerates the types of state replication available.

Enumerator
DeltaSnapshots 

Server Authoritative, Delta Snapshots send the complete world state from every network tick. This produces the highest accuracy simulation replication, but may not be suitable for higher object and player counts.

EventualConsistency 

Server Authoritative, Eventual Consistency allows for partial/culled state transmission, which may be necessary for implementing Area of Interest, high networked object counts, or high player counts.

◆ Topologies

enum Topologies
Enumerator
ClientServer 

Classic server and client model.

Shared 

Relay based shared world model.