docs.unity3d.com
    Show / Hide Table of Contents

    Class NetworkSimulatorPresetAsset

    ScriptableObject used to store the parameters to configure and simulate network conditions.

    Inheritance
    Object
    Object
    ScriptableObject
    NetworkSimulatorPresetAsset
    Inherited Members
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(String)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Multiplayer.Tools.NetworkSimulator.Runtime
    Syntax
    [CreateAssetMenu(fileName = "NetworkSimulatorPresetAsset", menuName = "Multiplayer/NetworkSimulatorPresetAsset")]
    public class NetworkSimulatorPresetAsset : ScriptableObject, INetworkSimulatorPreset

    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 NetworkSimulatorPresetAsset 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
    NetworkSimulatorPresetAsset

    A valid simulation configuration.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on 26 October 2023