docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct SimulatorUtility

    Utility methods and types for the simulator pipeline stage.

    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
    Remarks

    Most methods are meant for internal use only. It is recommended not to rely on anything in in structure since it is very likely to change in a future major version of the package.

    Constructors

    SimulatorUtility(int, int, int, int)

    Declaration
    public SimulatorUtility(int packetCount, int maxPacketSize, int packetDelayMs, int packetJitterMs)
    Parameters
    Type Name Description
    int packetCount
    int maxPacketSize
    int packetDelayMs
    int packetJitterMs

    Methods

    DelayPacket(ref NetworkPipelineContext, InboundSendBuffer, ref Requests, long)

    Declaration
    public bool DelayPacket(ref NetworkPipelineContext ctx, InboundSendBuffer inboundBuffer, ref NetworkPipelineStage.Requests requests, long timestamp)
    Parameters
    Type Name Description
    NetworkPipelineContext ctx
    InboundSendBuffer inboundBuffer
    NetworkPipelineStage.Requests requests
    long timestamp
    Returns
    Type Description
    bool

    FuzzPacket(Context*, ref InboundSendBuffer)

    Declaration
    public void FuzzPacket(SimulatorUtility.Context* ctx, ref InboundSendBuffer inboundBuffer)
    Parameters
    Type Name Description
    Context* ctx
    InboundSendBuffer inboundBuffer

    GetDelayedPacket(ref NetworkPipelineContext, ref InboundSendBuffer, ref Requests, long)

    Declaration
    public bool GetDelayedPacket(ref NetworkPipelineContext ctx, ref InboundSendBuffer delayedPacket, ref NetworkPipelineStage.Requests requests, long currentTimestamp)
    Parameters
    Type Name Description
    NetworkPipelineContext ctx
    InboundSendBuffer delayedPacket
    NetworkPipelineStage.Requests requests
    long currentTimestamp
    Returns
    Type Description
    bool

    GetEmptyDataSlot(byte*, ref int, ref int)

    Declaration
    public bool GetEmptyDataSlot(byte* processBufferPtr, ref int packetPayloadOffset, ref int packetDataOffset)
    Parameters
    Type Name Description
    byte* processBufferPtr
    int packetPayloadOffset
    int packetDataOffset
    Returns
    Type Description
    bool

    InitializeContext(Parameters, byte*)

    Declaration
    public static void InitializeContext(SimulatorUtility.Parameters param, byte* sharedProcessBuffer)
    Parameters
    Type Name Description
    SimulatorUtility.Parameters param
    byte* sharedProcessBuffer

    ShouldDropPacket(Context*, Parameters, long)

    Declaration
    public bool ShouldDropPacket(SimulatorUtility.Context* ctx, SimulatorUtility.Parameters param, long timestamp)
    Parameters
    Type Name Description
    Context* ctx
    SimulatorUtility.Parameters param
    long timestamp
    Returns
    Type Description
    bool
    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)