|
Unregister this server from the master server.
Does nothing if the server is not registered or has already unregistered.
function OnGUI() {
if (GUILayout.Button ("Disconnect")) {
Network.Disconnect();
MasterServer.UnregisterHost();
}
}
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void OnGUI() {
if (GUILayout.Button("Disconnect")) {
Network.Disconnect();
MasterServer.UnregisterHost();
}
}
}
import UnityEngine
import System.Collections
class example(MonoBehaviour):
def OnGUI():
if GUILayout.Button('Disconnect'):
Network.Disconnect()
MasterServer.UnregisterHost()