docs.unity3d.com
    Show / Hide Table of Contents

    Class NetworkSimulatorParameterExtensions

    Extensions for NetworkSimulatorParameter.

    Inheritance
    Object
    NetworkSimulatorParameterExtensions
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Networking.Transport
    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, Single, Single)

    Sets the NetworkSimulatorParameter in the settings.

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

    Settings to modify.

    Single receivePacketLossPercent

    Percentage of received packets to drop.

    Single sendPacketLossPercent

    Percentage of sent packets to drop.

    Returns
    Type Description
    NetworkSettings

    Settings structure with modified values.

    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