HostData.passwordProtected 密码保护

var passwordProtected : bool

Description描述

Does the server require a password?

服务器需要密码吗?

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void Start() {
		HostData[] hostData = MasterServer.PollHostList();
		foreach (HostData element in hostData) {
			Debug.Log(element.gameName + " password protected: " + element.passwordProtected);
		}
	}
}
// Requests info from the master server and prints
// if each host requires password or not
//从master服务器请求信息,并打印,是否每个主机需要密码或不

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