Events not received after attempt to start as client then server
andyasj
✭
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?
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?
0
Comments
-
Solved?
Seems to work if I override PersistBetweenStartupAndShutdown() in every global event listener.
Shouldn't this be defauilt behaviour?0 -
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.0
-
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.
0