docs.unity3d.com
    Show / Hide Table of Contents

    Class NetworkSimulatorPreset

    Preset containing the parameters to configure and simulate network conditions.

    Inheritance
    Object
    NetworkSimulatorPreset
    Inherited Members
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    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
    INetworkSimulatorPreset.Description

    Name

    Network simulation configuration name.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    String
    Implements
    INetworkSimulatorPreset.Name

    PacketDelayMs

    Value for the delay between packet in milliseconds.

    Declaration
    public int PacketDelayMs { get; set; }
    Property Value
    Type Description
    Int32
    Implements
    INetworkSimulatorPreset.PacketDelayMs

    PacketJitterMs

    Value for the network jitter (variance) in milliseconds.

    Declaration
    public int PacketJitterMs { get; set; }
    Property Value
    Type Description
    Int32
    Implements
    INetworkSimulatorPreset.PacketJitterMs

    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
    INetworkSimulatorPreset.PacketLossInterval

    PacketLossPercent

    Value for the average percentage of packet are dropped.

    Declaration
    public int PacketLossPercent { get; set; }
    Property Value
    Type Description
    Int32
    Implements
    INetworkSimulatorPreset.PacketLossPercent

    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
    Object.Equals(Object)

    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
    IEquatable<T>.Equals(T)

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    Object.GetHashCode()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Object.ToString()
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on 26 October 2023