docs.unity3d.com
    Show / Hide Table of Contents

    Struct SimulatorPreset

    Presets for the com.unity.transport simulator. Allows developers to simulate a variety of network conditions. AppendBaseSimulatorPresets(List<SimulatorPreset>) AppendAdditionalMobileSimulatorProfiles(List<SimulatorPreset>)

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.NetCode
    Syntax
    [Serializable]
    public struct SimulatorPreset

    Constructors

    SimulatorPreset(String, Int32, Int32, Int32, String)

    Construct a new preset.

    Declaration
    public SimulatorPreset(string name, int packetDelayMs, int packetJitterMs, int packetLossPercent, string tooltip)
    Parameters
    Type Name Description
    String name
    Int32 packetDelayMs
    Int32 packetJitterMs
    Int32 packetLossPercent
    String tooltip

    Properties

    IsCustom

    True if this is user-defined the preset.

    Declaration
    public readonly bool IsCustom { get; }
    Property Value
    Type Description
    Boolean

    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.

    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.

    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.

    BuildProfiles(List<SimulatorPreset>, Boolean, String, Int32, Int32, Int32, 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.

    Boolean 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.

    Int32 packetDelayMs

    Note that profiles add delay on top.

    Int32 packetJitterMs

    Note that profiles add delay on top.

    Int32 packetLossPercent

    Note that profiles add delay on top.

    String tooltip

    Note that profiles add delay on top.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023