Version: 2018.1
public static void ClearHostList ();

説明

PollHostList 関数に格納されている情報をすべて削除します。

リストを更新したい場合や古いデータを使用していないことを確認したい場合に役立ちます。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Awake() { MasterServer.ClearHostList(); MasterServer.RequestHostList("MyUniqueGameType"); } void Update() { if (MasterServer.PollHostList().Length != 0) { HostData[] hostData = MasterServer.PollHostList(); int i = 0; while (i < hostData.Length) { Debug.Log("Game name: " + hostData[i].gameName); i++; } MasterServer.ClearHostList(); } } }