docs.unity3d.com
    Show / Hide Table of Contents

    Struct NetworkSimulatorParameter

    Parameters for the global network simulator.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.Networking.Transport
    Syntax
    public struct NetworkSimulatorParameter : INetworkParameter
    Remarks

    These parameters are for the global network simulator, which applies to all traffic going through a NetworkDriver (including control traffic). For the parameters of SimulatorPipelineStage, refer to SimulatorUtility.Parameters.

    We recommend using SimulatorPipelineStage to simulate network conditions as it has more features than the global one (which is only intended for specialized use cases).

    Fields

    ReceivePacketLossPercent

    Percentage of received packets to drop (0-100).

    Declaration
    public float ReceivePacketLossPercent
    Field Value
    Type Description
    Single

    Packet loss percentage.

    SendPacketLossPercent

    Percentage of sent packets to drop (0-100).

    Declaration
    public float SendPacketLossPercent
    Field Value
    Type Description
    Single

    Packet loss percentage.

    Methods

    Validate()

    Checks if the values for all fields are valid. This method will be automatically called when adding parameters to the NetworkSettings.

    Declaration
    public bool Validate()
    Returns
    Type Description
    Boolean

    True if the parameter is valid, false otherwise.

    Implements
    INetworkParameter.Validate()
    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