Class NetworkSimulatorPreset
Preset containing the parameters to configure and simulate network conditions.
Inherited Members
Namespace: Unity.Multiplayer.Tools.NetworkSimulator.Runtime
Syntax
[Serializable]
public class NetworkSimulatorPreset : INetworkSimulatorPreset, IEquatable<NetworkSimulatorPreset>
Properties
Description
Optional description of the configuration.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
String |
Implements
Name
Network simulation configuration name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
String |
Implements
PacketDelayMs
Value for the delay between packet in milliseconds.
Declaration
public int PacketDelayMs { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Implements
PacketJitterMs
Value for the network jitter (variance) in milliseconds.
Declaration
public int PacketJitterMs { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Implements
PacketLossInterval
Value for at which interval packet are dropped This value is a drop every X packet, not in time.
Declaration
public int PacketLossInterval { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Implements
PacketLossPercent
Value for the average percentage of packet are dropped.
Declaration
public int PacketLossPercent { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Implements
Methods
Create(String, String, Int32, Int32, Int32, Int32)
Utility function to create a configuration at runtime.
Declaration
public static NetworkSimulatorPreset Create(string name, string description = "", int packetDelayMs = 0, int packetJitterMs = 0, int packetLossInterval = 0, int packetLossPercent = 0)
Parameters
Type | Name | Description |
---|---|---|
String | name | Name of the configuration. |
String | description | Description of the configuration. |
Int32 | packetDelayMs | Value for the packet delay in milliseconds. |
Int32 | packetJitterMs | Value for the network jitter in milliseconds. |
Int32 | packetLossInterval | Value for the packet loss interval. |
Int32 | packetLossPercent | Value for the packet loss percentage. |
Returns
Type | Description |
---|---|
NetworkSimulatorPreset | A valid simulation configuration. |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
Equals(NetworkSimulatorPreset)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(NetworkSimulatorPreset other)
Parameters
Type | Name | Description |
---|---|---|
NetworkSimulatorPreset | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
Boolean | true if the specified object is equal to the current object; otherwise, false. |
Implements
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |