unity-game-enginesteamsteamworks-api

Unity with Facepunch.steamworks


I am using facepunch.steamworks with unity to connect my game with steam, however; i found an action called

 SteamMatchmaking.OnLobbyMemberKicked

Which mean there is a way to kick players out of the lobby but I cant find it. is there a possible way to kick players out of the lobby?

I have tried looking into the Lobby and Steammatchmaking but couldn't find anyway for kicking the players


Solution

  • Well, this is interesting question because I was just looking for the same and was thinking I'm missing something obvious.

    Thing is that not even Steam seems to actually have kicking players from lobbies implemented and Facepunch is "just" kind of C# wrapper around Steam API. See Steam API docs LobbyKicked_t for reference: (Steamworks Documentation)

    In other words, likely best approach would be to send RPC to given client to invoke lobby leaving from client by calling Lobby.Leave() (Facepunch wiki)

    If anyone is aware of better option, I'm one ear, as I was hoping for some lobby kicking API, but seems not the case unfortunately

    Hope this helps someone at least