Class NetworkSimulatorSettings
In the Editor, MultiplayerPlayModePreferences are used. In development builds, json params can be loaded and enabled via command line arg. In prod builds, the network simulator is always disabled.
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
public static class NetworkSimulatorSettings
Properties
ClientSimulatorParameters
Values to use in simulation. Set values via 'Multiplayer PlayTools Window'.
Declaration
public static SimulatorUtility.Parameters ClientSimulatorParameters { get; }
Property Value
Type | Description |
---|---|
SimulatorUtility.Parameters |
DefaultSimulatorParameters
A decent default for testing realistic, poor network conditions.
Declaration
public static SimulatorUtility.Parameters DefaultSimulatorParameters { get; }
Property Value
Type | Description |
---|---|
SimulatorUtility.Parameters |
Enabled
Are the UTP Network Simulator stages in use? In the editor, the value comes from the 'Multiplayer PlayTools Window'.
Declaration
public static bool Enabled { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
RefreshSimulationPipelineParametersLive(in Parameters, ref NetworkDriverStore)
Utility to cycle through drivers and update their simulator pipelines with the inputted settings.
Declaration
public static void RefreshSimulationPipelineParametersLive(in SimulatorUtility.Parameters parameters, ref NetworkDriverStore store)
Parameters
Type | Name | Description |
---|---|---|
SimulatorUtility.Parameters | parameters | Settings to apply to live drivers. |
NetworkDriverStore | store | Store used to retrieve drivers from. |
SetSimulatorSettings(ref NetworkSettings)
Convenience that handles the new nuance of PacketDropPercentage
applying to two pipelines.
Declaration
public static void SetSimulatorSettings(ref NetworkSettings settings)
Parameters
Type | Name | Description |
---|---|---|
NetworkSettings | settings | Settings to modify. |