HostData.comment 注释

var comment : string

Description描述

A miscellaneous comment (can hold data)

一个多用途的注释(可以保存数据)

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void Start() {
		HostData[] hostData = MasterServer.PollHostList();
		foreach (HostData element in hostData) {
			Debug.Log(element.gameName + " description: " + element.comment + "\n");
		}
	}
}
// Requests info from the master server and prints
// the comment of each host
//从master服务器请求信息,并打印每个主机的注释

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