To browse the available servers, call
This takes one single parameter: the game type name (this is the same game type name you passed to RegisterHost).
This does not return anything, instead the result will be asynchronously downloaded, and the last known list of servers can be accessed via
MasterServer.PollHostList. Additionally, to ensure you aren't using old data, you can call
MasterServer.ClearHostList. For example, if the user hits the Refresh button in the lobby you might clear the host list and then request a new list from the Master Server.
The following script shows a lobby for users to browse available servers and connect to them:
using UnityEngine; using System.Collections; public ...