Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question Possible to get List of Servers from inside Unity?

Discussion in 'Game Server Hosting' started by CodeMonkeyYT, Mar 8, 2023.

  1. CodeMonkeyYT

    CodeMonkeyYT

    Joined:
    Dec 22, 2014
    Posts:
    125
    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!
     
    dnnkeeper likes this.
  2. danri

    danri

    Unity Technologies

    Joined:
    Jun 21, 2019
    Posts:
    27
  3. CodeMonkeyYT

    CodeMonkeyYT

    Joined:
    Dec 22, 2014
    Posts:
    125
    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 + "}");
     
    CM_RDX and dnnkeeper like this.