MasterServer.UnregisterHost 注销主机

static function UnregisterHost () : void

Description描述

Unregister this server from the master server.

从主服务器上注销本地服务器。

Does nothing if the server is not registered or has already unregistered.

如果服务器没有被注册或者已经注销了,什么都不做。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void OnGUI() {
		if (GUILayout.Button("Disconnect")) {
			Network.Disconnect();
			MasterServer.UnregisterHost();
		}
	}
}
function OnGUI() {
	if (GUILayout.Button ("Disconnect")) {
		Network.Disconnect();
		MasterServer.UnregisterHost();
	}
}
Page last updated: 2011-1-4