HostData.useNat 使用Nat
var useNat : bool
Description描述
Does this server require NAT punchthrough?
这个服务器需要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 + " Uses NAT: " + element.useNat);
}
}
}
// Requests info from the master server and prints if each host
// uses NAT punchthrough.
//从主服务器的请求信息,如果每个主机使用NAT穿通,并打印
function Start() {
var hostData : HostData[] = MasterServer.PollHostList();
for(var element : HostData in hostData) {
Debug.Log(element.gameName + " Uses NAT: " + element.useNat);
}
}
最后修改:2011年2月24日 Thursday 11:40