Clients reloading already loaded scene

Hey there,

So for my game, I have a "Main Menu" scene which contains both the UI for the main menu and for the multiplayer lobby.

I'm experiencing an issue where, when a client joins a lobby from the main menu scene, it is reloading the scene, even though it is already active. However, this only happens after I've done a BoltNework.LoadScene("Main Menu"). I understand that Bolt is loading whatever scene the server is in, but I was wondering if there is a way around this besides splitting the lobby into a different scene?

I should say that I am using a very outdated version of Bolt (0.4.3.19) on Unity 5.6. I've tried upgrading Unity before but it was going to take a lot of work that I figured should be spent elsewhere.

Thanks!

Comments

  • "Bolt (0.4.3.19) on Unity 5.6."
    I would upgrade Bolt asap. There are many many fixes since that version.

    You should only call BoltNework.LoadScene for scenes you want to force clients to load when the connect to you.
  • Just tried upgrading the project to Unity 2018.2.14f1 and it crashes when importing the assets, so that's not very promising :/. I'll try 2017.4.14f1 but I am still expecting a lot of errors if it successfully imports everything.

    So for my game, when the game starts it transitions from the main menu scene to my game scene. Obviously I want to use BoltNework.LoadScene here so all clients load the scene. Once the game ends, I have the option to return to the lobby. I use BoltNework.LoadScene again to load the main menu scene. This is where I am experiencing the issue. If a client joins at this point they will reload the menu scene. If a client joins before the game starts (i.e. before any calls to LoadScene) this does not happen.

    It's not a huge deal if I have to split the lobby into a separate scene, I would just have make sure the transition from main menu to lobby and vice-versa is smooth.
  • Bolt works fine on 5.6 afaik.

    Look at the Lobby sample for Photon Cloud in the samples package, it has a complete example of what you're trying to do.
  • Well, the asset store page won't allow me to download it for 5.6 since it's only been submitted for 2017.4.9 or higher. Would it be safe to download it using a one of those and just manually copy the folder?
  • Once you download the package on Unity 2017 you can close the editor, open up Unity 5.6, and import the package here.

    C:\Users\YourNameHere\AppData\Roaming\Unity\Asset Store-5.x\Exit Games\ScriptingNetwork
  • Ok, I'll definitely get Bolt up to date and take a look at that sample. Thanks!