HostData.guid 全局唯一标识符

var guid : string

Description描述

The GUID of the host, needed when connecting with NAT punchthrough.

主机的GUID,当使用NAT穿透连接时需要。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void Start() {
		HostData[] hostData = MasterServer.PollHostList();
		foreach (HostData element in hostData) {
			Debug.Log(element.gameName + " guid: " + element.guid + "\n");
		}
	}
}
// Requests info from the master server and prints
// the GUID
//从master服务器请求信息,并打印GUID

function Start() {
	var hostData : HostData[] = MasterServer.PollHostList();
	for(var element : HostData in hostData) {
		Debug.Log(element.gameName + " guid: " + element.guid + "\n");
	}
}
Page last updated: 2011-2-24