Search Unity

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

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

  1. CodeMonkeyYT

    CodeMonkeyYT

    Joined:
    Dec 22, 2014
    Posts:
    125
    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.