HostData.gameName 游戏名字
var gameName : string
Description描述
The name of the game (like John Doe's Game)
游戏的名字(像John Doe's Game)
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void Start() {
HostData[] hostData = MasterServer.PollHostList();
Debug.Log("Games found: ");
foreach (HostData element in hostData) {
Debug.Log(element.gameName);
}
}
}
// Requests info from the master server and prints
// the game name of each host
//从master服务器请求信息,并打印每个主机的游戏名字
function Start() {
var hostData : HostData[] = MasterServer.PollHostList();
Debug.Log("Games found: ");
for(var element : HostData in hostData) {
Debug.Log(element.gameName);
}
}
最后修改:2011年2月24日 Thursday 11:48