Posting this as an answer as I don't have enough rep to comment.
If you are only interested in the local client manually leaving a Lobby, then you could just toggle a local flag before doing so. If a Client disconnects from a Lobby, but doesn't have this flag enabled, it means they got kicked out.
If you are instead interested in warning the Lobby host that a Client left manually, then you could first send an RPC from the Client to the Host, informing them before leaving. Manual disconnects are simpler to handle because you can write your code in a way that makes the disconnection process happen only after your own checks.
As for the LobbyDeleted
event not firing, are you calling SubscribeToLobbyEventsAsync()
first? The docs don't mention this, but maybe only the Host can receive a LobbyDeleted
event?
There's also a KickedFromLobby
event that you could try and use.