Skip to main content

Unity.Multiplayer.Tools.NetworkSimulator.Runtime.NetworkSimulatorPreset

Preset containing the parameters to configure and simulate network conditions.

Inheritance#

System.Dynamic.ExpandoObject

System.Dynamic.ExpandoObject

Implements#

INetworkSimulatorPreset

System.IEquatable\<NetworkSimulatorPreset>

Inherited Members#

Object.Equals(Object, Object)

Object.ReferenceEquals(Object, Object)

Object.GetType()

Object.MemberwiseClone()

Namespace: System.Dynamic.ExpandoObject#
Assembly: Tools.dll#
Syntax#
[Serializable]
public class NetworkSimulatorPreset : INetworkSimulatorPreset, IEquatable<NetworkSimulatorPreset>

Properties#

Description#

Optional description of the configuration.

Declaration#

public string Description { get; set; }

Property Value#

TypeDescription
System.String

Name#

Network simulation configuration name.

Declaration#

public string Name { get; set; }

Property Value#

TypeDescription
System.String

PacketDelayMs#

Value for the delay between packet in milliseconds.

Declaration#

public int PacketDelayMs { get; set; }

Property Value#

TypeDescription
System.Int32

PacketJitterMs#

Value for the network jitter (variance) in milliseconds.

Declaration#

public int PacketJitterMs { get; set; }

Property Value#

TypeDescription
System.Int32

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#

TypeDescription
System.Int32

PacketLossPercent#

Value for the average percentage of packet are dropped.

Declaration#

public int PacketLossPercent { get; set; }

Property Value#

TypeDescription
System.Int32

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#

TypeNameDescription
System.StringnameName of the configuration.
System.StringdescriptionDescription of the configuration.
System.Int32packetDelayMsValue for the packet delay in milliseconds.
System.Int32packetJitterMsValue for the network jitter in milliseconds.
System.Int32packetLossIntervalValue for the packet loss interval.
System.Int32packetLossPercentValue for the packet loss percentage.

Returns#

TypeDescription
NetworkSimulatorPresetA valid simulation configuration.

Equals(Object)#

Declaration#

public override bool Equals(object obj)

Parameters#

TypeNameDescription
System.Objectobj

Returns#

TypeDescription
System.Boolean

Overrides#

System.Object.Equals(System.Object)

Equals(NetworkSimulatorPreset)#

Determines whether the specified object is equal to the current object.

Declaration#

public bool Equals(NetworkSimulatorPreset other)

Parameters#

TypeNameDescription
NetworkSimulatorPresetotherThe object to compare with the current object.

Returns#

TypeDescription
System.Booleantrue if the specified object is equal to the current object; otherwise, false.

GetHashCode()#

Declaration#

public override int GetHashCode()

Returns#

TypeDescription
System.Int32

Overrides#

System.Object.GetHashCode()

ToString()#

Declaration#

public override string ToString()

Returns#

TypeDescription
System.String

Overrides#

System.Object.ToString()

Implements#

INetworkSimulatorPreset

System.IEquatable\<T>