docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct SimulatorUtility.Parameters

    Configuration parameters for the simulator pipeline stage.

    Implements
    INetworkParameter
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Networking.Transport.Utilities
    Assembly: Unity.Networking.Transport.dll
    Syntax
    public struct SimulatorUtility.Parameters : INetworkParameter

    Fields

    FuzzFactor

    Use the fuzz factor when you want to fuzz a packet. For every packet a random number generator is used to determine if the packet should have the internal bits flipped. A percentage of 5 means approximately every 20th packet will be fuzzed, and that each bit in the packet has a 5 percent chance to get flipped.

    Declaration
    public int FuzzFactor
    Field Value
    Type Description
    int

    FuzzOffset

    Use the fuzz offset in conjunction with the fuzz factor, the fuzz offset will offset where we start flipping bits. This is useful if you want to only fuzz a part of the packet.

    Declaration
    public int FuzzOffset
    Field Value
    Type Description
    int

    MaxPacketCount

    The maximum amount of packets the pipeline can keep track of. This used when a packet is delayed, the packet is stored in the pipeline processing buffer and can be later brought back.

    Declaration
    public int MaxPacketCount
    Field Value
    Type Description
    int

    MaxPacketSize

    The maximum size of a packet which the simulator stores. If a packet exceeds this size it will bypass the simulator.

    Declaration
    public int MaxPacketSize
    Field Value
    Type Description
    int

    PacketDelayMs

    Fixed delay to apply to all packets which pass through.

    Declaration
    public int PacketDelayMs
    Field Value
    Type Description
    int

    PacketDropInterval

    Fixed interval to drop packets on. This is most suitable for tests where predictable behaviour is desired, every Xth packet will be dropped. If PacketDropInterval is 5 every 5th packet is dropped.

    Declaration
    public int PacketDropInterval
    Field Value
    Type Description
    int

    PacketDropPercentage

    Use a drop percentage when deciding when to drop packet. For every packet a random number generator is used to determine if the packet should be dropped or not. A percentage of 5 means approximately every 20th packet will be dropped.

    Declaration
    public int PacketDropPercentage
    Field Value
    Type Description
    int

    PacketJitterMs

    Variable delay to apply to all packets which pass through, adds or subtracts amount from fixed delay.

    Declaration
    public int PacketJitterMs
    Field Value
    Type Description
    int

    RandomSeed

    The random seed is used to set the initial seed of the random number generator. This is useful to get deterministic runs in tests for example that are dependant on the random number generator.

    Declaration
    public uint RandomSeed
    Field Value
    Type Description
    uint

    Methods

    Validate()

    Validate the settings.

    Declaration
    public bool Validate()
    Returns
    Type Description
    bool

    True if the settings are valid, false otherwise.

    Implements

    INetworkParameter
    In This Article
    Back to top
    Copyright © 2025 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)