Struct SimulatorPreset
Presets for the com.unity.transport simulator. Allows developers to simulate a variety of network conditions.
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
[Serializable]
public struct SimulatorPreset
Constructors
SimulatorPreset(string, int, int, int, int, string)
Construct a new preset.
Declaration
public SimulatorPreset(string name, int packetDelayMs, int packetJitterMs, int packetLossPercent, int packetFuzzPercent, string tooltip)
Parameters
Type | Name | Description |
---|---|---|
string | name | |
int | packetDelayMs | |
int | packetJitterMs | |
int | packetLossPercent | |
int | packetFuzzPercent | |
string | tooltip |
See Also
SimulatorPreset(string, int, int, int, string)
Construct a new preset.
Declaration
[Obsolete("Use other constructor. (RemovedAfter Entities 1.1)")]
public SimulatorPreset(string name, int packetDelayMs, int packetJitterMs, int packetLossPercent, string tooltip)
Parameters
Type | Name | Description |
---|---|---|
string | name | |
int | packetDelayMs | |
int | packetJitterMs | |
int | packetLossPercent | |
string | tooltip |
See Also
Properties
IsCustom
True if this is user-defined the preset.
Declaration
public bool IsCustom { get; }
Property Value
Type | Description |
---|---|
bool |
See Also
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/
- https://www.4g.co.uk/how-fast-is-4g/
Declaration
public static void AppendAdditionalMobileSimulatorProfiles(List<SimulatorPreset> list)
Parameters
Type | Name | Description |
---|---|---|
List<SimulatorPreset> | list | To append to. |
See Also
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]
- https://unity.com/products/multiplay
Declaration
public static void AppendAdditionalPCSimulatorPresets(List<SimulatorPreset> list)
Parameters
Type | Name | Description |
---|---|---|
List<SimulatorPreset> | list | To append to. |
See Also
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. |
See Also
BuildProfiles(List<SimulatorPreset>, bool, string, int, int, int, 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. |
bool | 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. |
int | packetDelayMs | Note that profiles add delay on top. |
int | packetJitterMs | Note that profiles add delay on top. |
int | packetLossPercent | Note that profiles add delay on top. |
string | tooltip | Note that profiles add delay on top. |
See Also
DefaultInUseSimulatorPresets(out string, List<SimulatorPreset>)
Returns appropriate presets for the targeted version.
Declaration
public static void DefaultInUseSimulatorPresets(out string presetGroupName, List<SimulatorPreset> appendPresets)
Parameters
Type | Name | Description |
---|---|---|
string | presetGroupName | |
List<SimulatorPreset> | appendPresets |