Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.Networking;
  5. using UnityEngine.UI;
  6.  
  7. public class NetworkHUDController : MonoBehaviour
  8. {
  9.     public NetworkManager networkManager;
  10.     public Button startServerButton;
  11.     public Button connectButton;
  12.     public Text ipAdressText;
  13.  
  14.     void Start()
  15.     {
  16.         if (Application.platform != RuntimePlatform.WindowsEditor)
  17.         {
  18.             networkManager.networkAddress = "192.168.1.4";
  19.             networkManager.networkPort = 7777;
  20.             networkManager.StartClient();
  21.  
  22.             GameObject.Find("serverCamera").SetActive(false);
  23.         }
  24.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement