MasterServer.UnregisterHost
static function UnregisterHost(): void;
static void UnregisterHost();
static def UnregisterHost() as void
Description

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

public class Example(MonoBehaviour):

	def OnGUI() as void:
		if GUILayout.Button('Disconnect'):
			Network.Disconnect()
			MasterServer.UnregisterHost()