void Awake() { DontDestroyOnLoad(this); GetComponent <NetworkView>().group = 1; mgs = GameObject.Find("MasterServerMenu").GetComponent <NetworkMasterServer>() as NetworkMasterServer; }
public static void register(string ip, int port) { NetworkMasterServer.getUInt32FromIP(ip); ushort num = (ushort)port; ushort num1 = (ushort)(num + 1); ushort num2 = (ushort)(num + 2); }
void Awake() { // Network level loading is done in a seperate channel. DontDestroyOnLoad(this); networkView.group = 1; //Application.LoadLevel("EmptyScene"); mgs = GameObject.Find("MasterServerMenu").GetComponent <NetworkMasterServer>() as NetworkMasterServer; }
void Awake() { // Network level loading is done in a seperate channel. DontDestroyOnLoad(this); networkView.group = 1; //Application.LoadLevel("EmptyScene"); mgs = GameObject.Find("MasterServerMenu").GetComponent<NetworkMasterServer>() as NetworkMasterServer; }
void OnGUI() { if (!lockcursor) { if (GUI.Button(new Rect(10, 10, 90, 30), "Disconnect")) //Show disconnect button { Network.Disconnect(); // Tell all the other clients you're disconnecting MasterServer.UnregisterHost(); NetworkMasterServer nms = GameObject.Find("MasterServerMenu(Clone)").GetComponent("NetworkMasterServer") as NetworkMasterServer; nms.dc(); Destroy(nms.gameObject); // Return to the Master Game Server Lobby because we pressed disconnect Application.LoadLevel("MasterGameServerLobby"); } } }