Skip to main content

Unity.Multiplayer.Tools.NetworkSimulator.Runtime.NetworkScenario

Base class to implement network scenarios, used to start, pause, and resume their behavior at runtime.

Inheritance#

System.Dynamic.ExpandoObject

System.Dynamic.ExpandoObject

System.Dynamic.ExpandoObject

System.Dynamic.ExpandoObject

Inherited Members#

Object.ToString()

Object.Equals(Object)

Object.Equals(Object, Object)

Object.ReferenceEquals(Object, Object)

Object.GetHashCode()

Object.GetType()

Object.MemberwiseClone()

Namespace: System.Dynamic.ExpandoObject#
Assembly: Tools.dll#
Syntax#
[Serializable]
public abstract class NetworkScenario
Remarks#

This base class should be used for custom scenarios. If an frame update is desired, NetworkScenarioBehaviour instead. If an asynchronous task-based implementation is desired, NetworkScenarioTask instead.

Properties#

IsPaused#

Pause state of the scenario. Returns true when the scenario is paused, false otherwise. Set to true to pause, set to false when paused to resume.

Declaration#

public bool IsPaused { get; set; }

Property Value#

TypeDescription
System.Boolean

Methods#

Dispose()#

Disposes the scenario.

Declaration#

public virtual void Dispose()

OnPause()#

Implement to define custom behaviour to be called when the scenario is paused.

Declaration#

protected virtual void OnPause()

OnResume()#

Implement to define custom behaviour to be called when the scenario is resumed.

Declaration#

protected virtual void OnResume()

Start(INetworkEventsApi)#

Starts running the underlying network scenario.

Declaration#

public abstract void Start(INetworkEventsApi networkEventsApi)

Parameters#

TypeNameDescription
INetworkEventsApinetworkEventsApiAPI to trigger network simulation events.