The core Fusion config file that is shared with all peers at startup. More...
Public Types | |
enum class | DeltaCompressors |
Delta Compression Implementations More... | |
enum class | PeerModes |
Options for running one or multiple peers in one Unity instance. Multiple is useful for testing multiple players/clients inside of the Unity editor without needing to build executables. Each peer is assigned its own independent physics scene and NetworkRunner instance. More... | |
enum class | PhysicsEngines |
Options for which Physics engines Fusion will use for simulations. More... | |
enum class | PhysicsModes |
Options for how physics is simulated on clients. More... | |
enum class | SceneLoadSpawnModes |
Spawn Modes while Scene is being loaded More... | |
Public Member Functions | |
delegate NetworkProjectConfigAsset | AssetLoadingDelegate () |
GlobalAssetLoading More... | |
delegate void | AssetUndloadingDelegate (NetworkProjectConfigAsset asset) |
GlobalAssetUnloading More... | |
override string | ToString () |
ToString() implementation. More... | |
Static Public Member Functions | |
static LocalPhysicsMode | ConvertPhysicsMode (NetworkProjectConfig.PhysicsEngines engine) |
Convert between NetworkProjectConfig.PhysicsEngines to LocalPhysicsMode More... | |
static NetworkProjectConfig | Deserialize (string data) |
De-serialize a NetworkProjectConfig from a JSON string (typically sent by the Room's Creator). More... | |
static string | Serialize (NetworkProjectConfig config) |
Serialize a NetworkProjectConfig into a JSON string. More... | |
static void | UnloadGlobal () |
Unloads Global, if already loaded. If loading Global has faulted, resets the state and next call to the Global accessor will attempt to load the config again. More... | |
Public Attributes | |
AccuracyDefaults | AccuracyDefaults = new AccuracyDefaults() |
The named global accuracies used by this project. More... | |
string[] | AssembliesToWeave |
Names of assemblies Fusion is going to weave. Not case sensitive. More... | |
bool | CheckNetworkedPropertiesBeingEmpty = false |
If set, the weaver will check if NetworkedAttribute properties getters and setters are empty. More... | |
bool | CheckRpcAttributeUsage = false |
If set, the weaver will check if RpcAttribute is used in types that do not support it. This requires all types to be scanned and can increase weaving duration. More... | |
DeltaCompressors | DeltaCompressor |
Current DeltaCompressor type. More... | |
bool | EnableHostMigration = false |
Enable support for Host Migration. More... | |
HeapConfiguration | Heap = new HeapConfiguration() |
Heap Settings More... | |
bool | HideNetworkObjectInactivityGuard = false |
Inactive NetworkObject need special handling in case they get destroyed without ever being activated. This is achieved with adding a nested GameObject called "NetworkObjectInactivityGuard" that tracks the OnDestroy message. HideNetworkObjectInactivityGuard can be used to control whether these guards are visible in the hierarchy or not. More... | |
uint | HostMigrationSnapshotInterval = 60 |
Delay in seconds between each time the Host sends a Snapshot of the current Simulation State, for use in Host Migration. More... | |
InterpolationConfiguration | Interpolation = new InterpolationConfiguration() |
Reference to InterpolationConfiguration settings for this NetworkProjectConfig. More... | |
bool | InvokeRenderInBatchMode = true |
Signal if the SimulationBehaviour.Render callbacks should be invoked in Batch Mode. More... | |
LagCompensationSettings | LagCompensation = new LagCompensationSettings() |
Advanced lag compensation buffer settings. More... | |
ushort | MaxNetworkedObjectCount = 1 << 13 |
Max number of allowed NetworkObjects in a room. More... | |
NetworkConfiguration | Network = new NetworkConfiguration() |
Reference to NetworkConfiguration settings for this NetworkProjectConfig. More... | |
NetworkSimulationConfiguration | NetworkConditions = new NetworkSimulationConfiguration() |
Settings for simulating network conditions of latency and loss. More... | |
bool | NetworkIdIsObjectName |
Signal if the NetworkId of the NetworkObject should be included on the name of the GameObject. More... | |
bool | NullChecksForNetworkedProperties = true |
If set, the weaver will add a check to all [Networked] properties on each NetworkBehaviour to verify if owing NetworkObject has been attached to. More... | |
PeerModes | PeerMode |
Setting for whether multiple peers can run per Unity instance (typically to allow easy testing of multiple peers inside of the editor). More... | |
PhysicsEngines | PhysicsEngine |
Setting for which physics engine Fusion will simulate with. More... | |
NetworkPrefabTable | PrefabTable = new NetworkPrefabTable() |
Reference to the NetworkPrefabTable instance for this NetworkProjectConfig. More... | |
SceneLoadSpawnModes | SceneLoadSpawnMode = SceneLoadSpawnModes.NotAllowed |
Current SceneLoadSpawnMode. More... | |
PhysicsModes | ServerPhysicsMode |
Setting for which ServerPhysicsMode Fusion will use in server or host mode. Not used in shared mode. More... | |
SimulationConfig | Simulation = new SimulationConfig() |
Reference to SimulationConfig settings for this NetworkProjectConfig. More... | |
string | TypeId = CurrentTypeId |
Current NetworkProjectConfig Type ID More... | |
bool | UseLagCompensation = true |
Use lag compensation. Not used in shared mode. More... | |
bool | UseSerializableDictionary = true |
Use Fusion.SerializableDictionary to store [Networked] dictionary properties initial value. If unchecked, the weaver will emit System.Generic.Dictionary instead - a type that's not Unity-serializable, but custom serializers (e.g. Odin) may support it. More... | |
int | Version = CurrentVersion |
Current NetworkProjectConfig version More... | |
Static Public Attributes | |
static NetworkRunner. | BuildTypes |
Get the version information for the Fusion.Runntime.dll. More... | |
const string | CurrentTypeId = nameof(NetworkProjectConfig) |
Current NetworkProjectConfig Type ID More... | |
const int | CurrentVersion = 1 |
Current NetworkProjectConfig version More... | |
const string | DefaultResourceName = nameof(NetworkProjectConfig) |
Default file name for the NetworkProjectConfig asset More... | |
Properties | |
static NetworkProjectConfig | Global [get] |
Reference for the default NetworkProjectConfig More... | |
static AssetLoadingDelegate | GlobalAssetLoading |
Invoked when a config is a about to be loaded from a default location (a Resource DefaultResourceName). If the event returns a non-null value, it will accepted as the config source and no attempt to load the default asset will be made. More... | |
static AssetUndloadingDelegate | GlobalAssetUnloading |
Invoked when a config is about to be unloaded (due to UnloadGlobal). More... | |
The core Fusion config file that is shared with all peers at startup.
|
strong |
|
strong |
Options for running one or multiple peers in one Unity instance. Multiple is useful for testing multiple players/clients inside of the Unity editor without needing to build executables. Each peer is assigned its own independent physics scene and NetworkRunner instance.
|
strong |
Options for which Physics engines Fusion will use for simulations.
Enumerator | |
---|---|
Physics3D | The Unity PhysX simulation is used, but auto-simulation is disabled and simulations are controlled by Fusion. |
Physics2D | The Unity Box2D simulation is used, but auto-simulation is disabled and simulations are controlled by Fusion. |
None | Fusion preforms no Physics Simulate() calls. |
|
strong |
Options for how physics is simulated on clients.
PhysicsModes.ServerOnly - Clients do not predict remote objects, and render in their remote time frame (relative past).
PhysicsModes.ClientPrediction - Clients predict remote objects and have options for rendering them in local and/or remote time frames.
|
strong |
delegate NetworkProjectConfigAsset AssetLoadingDelegate | ( | ) |
delegate void AssetUndloadingDelegate | ( | NetworkProjectConfigAsset | asset | ) |
|
static |
Convert between NetworkProjectConfig.PhysicsEngines to LocalPhysicsMode
|
static |
De-serialize a NetworkProjectConfig from a JSON string (typically sent by the Room's Creator).
data | JSON string of a serialized NetworkProjectConfig |
|
static |
Serialize a NetworkProjectConfig into a JSON string.
config | NetworkProjectConfig reference |
override string ToString | ( | ) |
ToString() implementation.
|
static |
The named global accuracies used by this project.
string [] AssembliesToWeave |
Names of assemblies Fusion is going to weave. Not case sensitive.
|
static |
Get the version information for the Fusion.Runntime.dll.
bool CheckNetworkedPropertiesBeingEmpty = false |
If set, the weaver will check if NetworkedAttribute properties getters and setters are empty.
bool CheckRpcAttributeUsage = false |
If set, the weaver will check if RpcAttribute is used in types that do not support it. This requires all types to be scanned and can increase weaving duration.
|
static |
Current NetworkProjectConfig Type ID
|
static |
Current NetworkProjectConfig version
|
static |
Default file name for the NetworkProjectConfig asset
DeltaCompressors DeltaCompressor |
Current DeltaCompressor type.
bool EnableHostMigration = false |
Enable support for Host Migration.
HeapConfiguration Heap = new HeapConfiguration() |
Heap Settings
bool HideNetworkObjectInactivityGuard = false |
Inactive NetworkObject need special handling in case they get destroyed without ever being activated. This is achieved with adding a nested GameObject called "NetworkObjectInactivityGuard" that tracks the OnDestroy message. HideNetworkObjectInactivityGuard can be used to control whether these guards are visible in the hierarchy or not.
uint HostMigrationSnapshotInterval = 60 |
Delay in seconds between each time the Host sends a Snapshot of the current Simulation State, for use in Host Migration.
InterpolationConfiguration Interpolation = new InterpolationConfiguration() |
Reference to InterpolationConfiguration settings for this NetworkProjectConfig.
bool InvokeRenderInBatchMode = true |
Signal if the SimulationBehaviour.Render callbacks should be invoked in Batch Mode.
LagCompensationSettings LagCompensation = new LagCompensationSettings() |
Advanced lag compensation buffer settings.
ushort MaxNetworkedObjectCount = 1 << 13 |
Max number of allowed NetworkObjects in a room.
NetworkConfiguration Network = new NetworkConfiguration() |
Reference to NetworkConfiguration settings for this NetworkProjectConfig.
NetworkSimulationConfiguration NetworkConditions = new NetworkSimulationConfiguration() |
Settings for simulating network conditions of latency and loss.
bool NetworkIdIsObjectName |
Signal if the NetworkId of the NetworkObject should be included on the name of the GameObject.
bool NullChecksForNetworkedProperties = true |
If set, the weaver will add a check to all [Networked] properties on each NetworkBehaviour to verify if owing NetworkObject has been attached to.
PeerModes PeerMode |
Setting for whether multiple peers can run per Unity instance (typically to allow easy testing of multiple peers inside of the editor).
PhysicsEngines PhysicsEngine |
Setting for which physics engine Fusion will simulate with.
NetworkPrefabTable PrefabTable = new NetworkPrefabTable() |
Reference to the NetworkPrefabTable instance for this NetworkProjectConfig.
SceneLoadSpawnModes SceneLoadSpawnMode = SceneLoadSpawnModes.NotAllowed |
Current SceneLoadSpawnMode.
PhysicsModes ServerPhysicsMode |
Setting for which ServerPhysicsMode Fusion will use in server or host mode. Not used in shared mode.
Reference to SimulationConfig settings for this NetworkProjectConfig.
string TypeId = CurrentTypeId |
Current NetworkProjectConfig Type ID
bool UseLagCompensation = true |
Use lag compensation. Not used in shared mode.
bool UseSerializableDictionary = true |
Use Fusion.SerializableDictionary to store [Networked] dictionary properties initial value. If unchecked, the weaver will emit System.Generic.Dictionary instead - a type that's not Unity-serializable, but custom serializers (e.g. Odin) may support it.
int Version = CurrentVersion |
Current NetworkProjectConfig version
|
staticget |
Reference for the default NetworkProjectConfig
|
staticaddremove |
Invoked when a config is a about to be loaded from a default location (a Resource DefaultResourceName). If the event returns a non-null value, it will accepted as the config source and no attempt to load the default asset will be made.
|
staticaddremove |
Invoked when a config is about to be unloaded (due to UnloadGlobal).