Events not received after attempt to start as client then server

andyasj
andyasj
edited October 2018 in Photon Bolt
Testing various connection scenarios I have a problem.

If a player starts as client but there are no sessions then I call BoltLauncher.Shutdown(); (is this correct or not?).
If the player then starts as server (either BoltLauncher.StartServer(); or BoltLauncher.StartSinglePlayer();) then players are Instantiated OK but I can get no events to be received even if sent to Everyone.
Everything works fine if the player first starts as Server (or SinglePlayer).

What is the problem?

Comments

  • Solved?
    Seems to work if I override PersistBetweenStartupAndShutdown() in every global event listener.
    Shouldn't this be defauilt behaviour?
  • Oh, I also have problem to shutdown Bolt when players return to main menu too. Can you share more on what you did on PersistBetweenStartupAndShutdown? Thanks.
  • I just added
        public override bool PersistBetweenStartupAndShutdown()
        {
            return true;
        }
    to every GlobalEventListener.

    So now if I attempt to start as client then call BoltLauncher.Shutdown(); then start as Server, the EventListeners are still working.