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 ExampleClass : MonoBehaviour { void OnGUI() { if (GUILayout.Button("Disconnect")) { Network.Disconnect(); MasterServer.UnregisterHost(); } } }