docs.unity3d.com
    Show / Hide Table of Contents

    Class NetworkScenario

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

    Inheritance
    Object
    NetworkScenario
    NetworkScenarioBehaviour
    NetworkScenarioTask
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Multiplayer.Tools.NetworkSimulator.Runtime
    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
    Type Description
    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
    Type Name Description
    INetworkEventsApi networkEventsApi

    API to trigger network simulation events.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on 26 October 2023