言語: 日本語
  • C#
  • JS
  • Boo

スクリプト言語

お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。

HostData.ip

public var ip: string[];

Description

サーバーのIP アドレスを返す

	// Requests info from the master server and prints
	// the ip of each host.

	function Start() {
		var hostData : HostData[] = MasterServer.PollHostList();
		for(var element : HostData in hostData) {
			var tmpIp : String = "";
			for(var i : int = 0; i < element.ip.Length; i++) {
				tmpIp = element.ip[i] + " ";
			}
			Debug.Log(element.gameName + " ip: " + tmpIp + ":" + element.port);
		}
	}