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);
	}
}
Page last updated: 2011-2-24