Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Does Lobby already support Environments? Documentation says no, but it seems to work fine.

Discussion in 'Lobby' started by Liam-C, Aug 16, 2023.

  1. Liam-C

    Liam-C

    Joined:
    Mar 6, 2017
    Posts:
    17
    I recently released an update for our multiplayer game integrating public lobbies. Now that the update is live, I wanted a separate development environment for our developers to use without mixing with real players.

    I saw that the Lobby dashboard has an Environment dropdown which selects "production" by default, but looking into the Environments documentation it seems that Lobby isn't one of the supported services. It currently lists 7 other services and mentions "Unity Game Services will continue to release Environments support for additional services".

    https://docs.unity.com/ugs/en-us/manual/overview/manual/service-environments

    However, I saw that the Lobby package has a dependency on the Services.Core package which contains the SetEnvironmentName method for initialising Services, so I tested that out and it seems to work fine. I created an environment in the dashboard called "dev", and if Debug.isDebugBuild is true, I set options.SetEnvironmentName("dev") before calling UnityServices.InitializeAsync(options). My requests work as normal and i can see matching requests in the Lobby dashboard with the "dev" environment selected from the dropdown.

    Is the documentation just out of date or incorrect? Is there any issues we should know about before using Lobbies with non-default environments? It clearly works, but i haven't tested it extensively yet so there might be issues i haven't come across yet.

    I should also note that Lobby is the only UGS service we're using currently. We're not using any of the services that the docs explicitly mentions are supported.
     
  2. bartj-unity

    bartj-unity

    Unity Technologies

    Joined:
    Sep 9, 2021
    Posts:
    25
    Hi Liam-C,

    Looks like those docs are indeed out-of-date. Lobby supports environments so you should be good to use a separate one for your developers!
     
  3. Liam-C

    Liam-C

    Joined:
    Mar 6, 2017
    Posts:
    17
    Great! Thanks for the confirmation.