Struct SimulatorPreset
Presets for the com.unity.transport simulator. Allows developers to simulate a variety of network conditions. AppendBaseSimulatorPresets(List<SimulatorPreset>) AppendAdditionalMobileSimulatorProfiles(List<SimulatorPreset>)
Inherited Members
Namespace: Unity.NetCode
Syntax
[Serializable]
public struct SimulatorPreset
Constructors
SimulatorPreset(String, Int32, Int32, Int32, String)
Construct a new preset.
Declaration
public SimulatorPreset(string name, int packetDelayMs, int packetJitterMs, int packetLossPercent, string tooltip)
Parameters
Type | Name | Description |
---|---|---|
String | name | |
Int32 | packetDelayMs | |
Int32 | packetJitterMs | |
Int32 | packetLossPercent | |
String | tooltip |
Properties
IsCustom
True if this is user-defined the preset.
Declaration
public readonly bool IsCustom { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
AppendAdditionalMobileSimulatorProfiles(List<SimulatorPreset>)
These are best-estimate approximations for mobile connection types, informed by real world data. Last updated Q3 2022.
Sources:
- Developers [Multiplayer, Support and Customers]
- https://unity.com/products/multiplay
- https://www.giffgaff.com/blog/h-5g-lte-a-g-e-new-cell-network-alphabet/
Declaration
public static void AppendAdditionalMobileSimulatorProfiles(List<SimulatorPreset> list)
Parameters
Type | Name | Description |
---|---|---|
List<SimulatorPreset> | list | To append to. |
AppendAdditionalPCSimulatorPresets(List<SimulatorPreset>)
These are best-estimate approximations of PC and Console connection types, informed by real world data. Last updated Q3 2022.
Sources:
- Developers [Multiplayer, Support and Customers]
Declaration
public static void AppendAdditionalPCSimulatorPresets(List<SimulatorPreset> list)
Parameters
Type | Name | Description |
---|---|---|
List<SimulatorPreset> | list | To append to. |
AppendBaseSimulatorPresets(List<SimulatorPreset>)
The most common profiles, including custom debug ones. Last updated Q3 2022.
Declaration
public static void AppendBaseSimulatorPresets(List<SimulatorPreset> list)
Parameters
Type | Name | Description |
---|---|---|
List<SimulatorPreset> | list | To append to. |
BuildProfiles(List<SimulatorPreset>, Boolean, String, Int32, Int32, Int32, String)
Builds sub-profiles for your profile. E.g. 4 regional options for your custom profile.
Declaration
public static void BuildProfiles(List<SimulatorPreset> list, bool showRegional, string name, int packetDelayMs, int packetJitterMs, int packetLossPercent, string tooltip)
Parameters
Type | Name | Description |
---|---|---|
List<SimulatorPreset> | list | To append to. |
Boolean | showRegional | False for any profiles that are such poor quality, that you don't even want to allow users to select regional servers (as it would be pointless, and give the wrong impression). |
String | name | Name of profile. Include a forward slash if you want sub-profiles to be in a sub-menu. |
Int32 | packetDelayMs | Note that profiles add delay on top. |
Int32 | packetJitterMs | Note that profiles add delay on top. |
Int32 | packetLossPercent | Note that profiles add delay on top. |
String | tooltip | Note that profiles add delay on top. |