How To Change Sessions / Rooms?

Options

We're working on a project with Photon Fusion, and a part of the project is we need to be able to change the Session the player is in, as we have worlds and each world is broken into individual Sessions / Rooms. We can join these sessions just fine, but are having a hard time figuring out how to change to another room.

Essentially what I need is something like this:


await networkRunner.StartGame(firstSessionName);

await networkRunner.StopGame();

await networkRunner.StartGame(secondSessionName);


Obviously we wouldn't join then immediately leave for another room, but just want to be able to leave anytime to join another room. Thanks in advance!

Comments

  • Luke_Sta
    Options

    Is something not working if you do the above?

  • Hi,

    That should be doable, but remember to put some delay between the Shutdown and the StartGame .

    Also, NetworkRunners are not meant to be reusable, you should create another one for starting the new session.

    FYI: It's possible to be on more than one session at the same time, you just need to manage that carefully.

    -----

    Isaac Augusto

    Photon Fusion Team

  • This did it - thank you Isaac! (For the Photon Fusion devs - this is something that is lacking from your documentation - I scoured it for two days and found nothing. Please add this to your documentation as changing rooms is kind of important!! Thank you! :D)