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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Feedback Why does Lobby.RemovePlayerAsync(); return Task and not Task<Lobby>?

Discussion in 'Multiplayer' started by CodeMonkeyYT, Nov 16, 2022.

  1. CodeMonkeyYT


    Dec 22, 2014
    Hi there,

    I'm working with Lobby and it seems odd how LobbyService.Instance.RemovePlayerAsync(); is different from the other functions, it just returns a Task and not Task<Lobby>

    That means that when a player leaves or is kicked from the Lobby it requires an extra GetLobbyAsync(); to get the updated Lobby.

    I think it should return a Task<Lobby> just like all the other functions that change the Lobby state.
    UnityKristy likes this.