docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method StartNetworkManager

    StartNetworkManager(out NetworkManager, NetworkManagerOperatingMode, NetworkConfig)

    Called upon the RpcQueueTests being instantiated. This creates an instance of the NetworkManager to be used during unit tests. Currently, the best method to run unit tests is by starting in host mode as you can send messages to yourself (i.e. Host-Client to Host-Server and vice versa). As such, the default setting is to start in Host mode.

    Declaration
    public static bool StartNetworkManager(out NetworkManager networkManager, NetworkManagerHelper.NetworkManagerOperatingMode managerMode = NetworkManagerOperatingMode.Host, NetworkConfig networkConfig = null)
    Parameters
    Type Name Description
    NetworkManager networkManager
    NetworkManagerHelper.NetworkManagerOperatingMode managerMode

    parameter to specify which mode you want to start the NetworkManager

    NetworkConfig networkConfig

    parameter to specify custom NetworkConfig settings

    Returns
    Type Description
    bool

    true if it was instantiated or is already instantiate otherwise false means it failed to instantiate

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