How to join a different room while currently inside a room?

So the problem I'm facing here is that players join a room so they can party up together, like joining the same waiting room as your friends. But I want all of the players in the waiting room to join the same game together!

I know I'm probably going to have to make the Host send an RPC function so everyone joins, but I just don't know exactly how this is all going to work...

Answers

  • JohnTube
    JohnTube ✭✭✭✭✭

    Hi @Klover

    Thank you for choosing Photon!

    In order to switch rooms you need to leave the currently joined one and join another.

    To achieve the matchmaking you want you could make use of FindFriends where you poll for the master client's UserId and follow him to the next room if you don't know the room name, if the room name is known simply go to that room as explained above: leave and then join.