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. |