Get the rooms list

antigodeantigode
edited May 24 in DotNet
I'm trying to fetch the rooms list. What I did:

	// When player A create a room:
	TypedLobby type = new TypedLobby("lob1", LobbyType.Default);
	m_LoadBalancingClient.OpCreateRoom(new EnterRoomParams { RoomName = gameData.Name, RoomOptions = roomOptions, Lobby = type })
	[...]
	// When player B join a lobby:
	TypedLobby type = new TypedLobby("lob1",LobbyType.Default);//TypedLobby.Default;
	m_LoadBalancingClient.OpJoinLobby(type)
When player B joined the lobby, he never gets OnRoomListUpdate triggered, What am I doing wrong ?

Comments

  • Hi @antigode,

    Go through each of the points listed in our "Matchmaking Checklist".
  • antigodeantigode
    edited May 27
    I've already read on this link, It's all about several players (why we can't see the room, different UserId...). But the OnRoomListUpdate, isn't it supposed to trigger when local player join a lobby, even if there is no room ? I set a debug log in this OnRoomListUpdate and It never shows up!

    UP:
    Anyway, i set a refresh button calling: OpGetGameList and it returns me false !! You have an idea ? I'm currently digging...

    UP2: Ok i didnt set a sqlLobbyFilter, just "" because i don't need to filter the rooms but i wanted to try this as this works in the cockpit demo and can't figure out how to make trigger this OnRoomListUpdate just with default lobby... So the opGetGameList returns now true but still no event triggered

    UP3: Well sorry for this third up x) I found that i get the game list in the response. But when OnRoomListUpdate is used then ?! oO And has it to be a sql lobby type to get this game list ? I just want to fetch rooms list from default lobby
  • Hi @antigode,

    Did you make sure both players are on the same region (same servers), same AppId, same AppVersion (PUN version and GameVersion), same lobby (type + name)?
    Also, did you wait until the player is joined to the lobby and the callback IMatchmakingCallbacks.OnJoinedLobby is triggered?
    Did the room finish creation successfully and is visible to the lobby?
    I set a debug log in this OnRoomListUpdate and It never shows up!
    Could you share the code? maybe you forgot to register the class implementing the callbacks if you are not extending MonoBehaviourPunCallbacks or if you do, you forgot to call base.OnEnable when overriding OnEnable or implementing a new replaced OnEnable which hides the base one.
  • I'm not using PUN, just realtime SDK. The issue was that i didn't set the AddCallbackTarget.
    Now it's working, just when a room close, the roomListUpdate is triggered but still the room closed in it (ttl = 0). Is it triggered before the change ?
  • Hum, ok it has to be roomoption.RemovedFromList ?! Thanks for the help
Sign In or Register to comment.