Version: 2017.1
public int port ;

説明

サーバーポートを返す

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Start() { HostData[] hostData = MasterServer.PollHostList(); foreach (HostData element in hostData) { string tmpIp = ""; int i = 0; while (i < element.ip.Length) { tmpIp = element.ip[i] + " "; i++; } Debug.Log(element.gameName + " ip: " + tmpIp + ":" + element.port); } } }