I have been using OnLobbyEntered callback to handle joining process. But I have added some custom metadata to send name of the map, as it varies from lobby to lobby. Apparently, it goes like this:
- Host successfuly sets the metadata // Debug says so
lobby.SetData("roomName", setRoomName);
lobby.SetData("map", mapName);
lobby.SetData("isDemo", isDemo ? "true" : "false");
- Matchmaking lists lobbies and can see metadata // I can successfuly render room name, map name etc
Task<Lobby[]> lobbies = SteamMatchmaking.LobbyList.RequestAsync();
yield return new WaitUntil(() => lobbies.IsCompleted);
if (lobbies.IsFaulted) {
Debug.LogError("Failed to fetch lobbies: " + lobbies.Exception);
yield break;
}
Lobby[] fetchedLobbies = lobbies.Result;
- Player tries to join the lobby and has no metadata // OnLobbyEntered callback => Received lobby reference does not have metadata.
private void OnLobbyEntered(Lobby lobby) {
lobby.GetData("map"); // No metadata
}
- Matching with lobby list request workaround // Use RequestAsync metadata instead
Simply some functions that finds a lobby using lobbyId. SteamMatchmaking.LobbyList.RequestAsync()
This works well. But most likely going to break for Friend Only lobbies as it includes matchmaking.
So, any idea what is happening? Am I not supposed to receive metadata through this callback? Looks like we don't have RequestLobbyData, which updates lobby data of a lobby reference. Any healthy workaround?
Facepunch Steamworks: 2.4.1.0
I have been using OnLobbyEntered callback to handle joining process. But I have added some custom metadata to send name of the map, as it varies from lobby to lobby. Apparently, it goes like this:
So, any idea what is happening? Am I not supposed to receive metadata through this callback? Looks like we don't have RequestLobbyData, which updates lobby data of a lobby reference. Any healthy workaround?
Facepunch Steamworks: 2.4.1.0