예제 #1
0
 void Awake()
 {
     networkManager = MercNetworkManager.Find();
     if (networkManager == null)
     {
         networkManager = Instantiate <MercNetworkManager>(networkManagerPrefab);
     }
 }
예제 #2
0
    void Awake()
    {
        Debug.Log($"GameController awake");

        networkManager = MercNetworkManager.Find();
        if (networkManager == null)
        {
            networkManager = Instantiate <MercNetworkManager>(networkManagerPrefab);
            Debug.Log($"Automatically starting host for debugging purposes (scene: {gameObject.scene})");

            networkManager.networkAuthenticator.nickname = "Tester";
            networkManager.StartHost();
        }
    }