Possible to get List of Servers from inside Unity?

Hi there!

Is it possible to get a list of the servers from within Unity?

Basically I was thinking that it would be possible to make a Server Browser so we could use GSHosting without using Matchmaker, but apparently that’s not possible?
The only way to do that sort of thing would be to hardcode the IP/Ports in the game itself, and manually start/restart them in the dashboard?

Thanks!

1 Like

Hello,

There is an API which will let you list servers in a given project and fleet - Unity Services Web API docs

Bear in mind that this is a paginated API, so you will need to trade off response time of the API with the amount of servers you retrieve per-page.

Oh great thanks, I did not know about that WebAPI.
Is there any reason why this type of functionality isn’t included in the Unity Multiplay package? Seems like it would be something very useful to many games. Is it to require authentication?

Also the JSON returned from that doesn’t work well with JsonUtility, I had to put it inside a dummy object with a name for it to work
JsonUtility.FromJson<ListServers>("{\"serverList\":" + json + "}");

2 Likes