Class NetworkSimulator
Add this component to any game object to configure network simulation parameters.
Inherited Members
Namespace: Unity.Multiplayer.Tools.NetworkSimulator .Runtime
Assembly: solution.dll
Syntax
[AddComponentMenu("Netcode/Network Simulator")]
public class NetworkSimulator : MonoBehaviour, INotifyPropertyChanged, INetworkEventsApi
Fields
Name | Description |
---|---|
Auto |
Allows to determine if network scenarios should start automatically or not. |
Properties
Name | Description |
---|---|
Connection |
The Connection Preset used to define a set of connection parameters to simulate the network condition at runtime. |
Current |
Returns the current connection preset used to simulate network conditions. |
Is |
Returns whether the underlying network transport is available. |
Is |
Returns whether the underlying network transport is connected. |
Scenario | The Network Scenario used to modify network connection parameters at runtime. The new scenario will start automatically under specific circumstances: If autorun is enabled and the application is in playmode and the new scenario is valid (not None/null) and the previous scenario was a running valid one. |
Methods
Name | Description |
---|---|
Change |
Changes the current connection preset used to simulate network condition parameters. |
Disconnect() | Simulates a network disconnection. |
Reconnect() | Reconnects after simulating a network disconnection. |
Trigger |
Simulates a lag spike for the specified duration. |
Trigger |
Simulates a lag spike for the specified duration. |