docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface INetworkEventsApi

    API that can be used to inspect the state of the simulated network and trigger events.

    Namespace: Unity.Multiplayer.Tools.NetworkSimulator.Runtime
    Assembly: solution.dll
    Syntax
    public interface INetworkEventsApi

    Properties

    Name Description
    CurrentPreset

    Returns the current connection preset used to simulate network conditions.

    IsAvailable

    Returns whether the Network Simulator fulfills all required dependencies and is available to be used.

    IsConnected

    Returns true when Network Simulator is connected.

    Methods

    Name Description
    ChangeConnectionPreset(INetworkSimulatorPreset)

    Changes the current connection preset used to simulate network condition parameters.

    Disconnect()

    Simulates a network disconnection.

    Reconnect()

    Reconnects after simulating a network disconnection.

    TriggerLagSpike(TimeSpan)

    Simulates a lag spike for the specified duration.

    TriggerLagSpikeAsync(TimeSpan)

    Simulates a lag spike for the specified duration.

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