docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class NetworkSimulatorParameterExtensions

    Extensions for NetworkSimulatorParameter.

    Inheritance
    object
    NetworkSimulatorParameterExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Networking.Transport
    Assembly: Unity.Networking.Transport.dll
    Syntax
    public static class NetworkSimulatorParameterExtensions

    Methods

    ModifyNetworkSimulatorParameters(NetworkDriver, NetworkSimulatorParameter)

    Modify the parameters of the global network simulator.

    Declaration
    public static void ModifyNetworkSimulatorParameters(this NetworkDriver driver, NetworkSimulatorParameter newParams)
    Parameters
    Type Name Description
    NetworkDriver driver

    Driver to modify.

    NetworkSimulatorParameter newParams

    New parameters for the simulator.

    WithNetworkSimulatorParameters(ref NetworkSettings, float, float, uint, uint, float)

    Sets the NetworkSimulatorParameter in the settings.

    Declaration
    public static ref NetworkSettings WithNetworkSimulatorParameters(this ref NetworkSettings settings, float receivePacketLossPercent = 0, float sendPacketLossPercent = 0, uint sendDelayMS = 0, uint sendJitterMS = 0, float sendDuplicatePercent = 0)
    Parameters
    Type Name Description
    NetworkSettings settings

    Settings to modify.

    float receivePacketLossPercent

    Percentage of received packets to drop.

    float sendPacketLossPercent

    Percentage of sent packets to drop.

    uint sendDelayMS

    Milliseconds of delay to add to sent packets.

    uint sendJitterMS

    Milliseconds of delaying variance sending packet.

    float sendDuplicatePercent

    Percentage of sent packets to duplicate.

    Returns
    Type Description
    NetworkSettings

    Settings structure with modified values.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)