Bolt.GlobalEventListener.OnEvent no longer receiving event messages after BoltNetwork.Shutdown()
Options
in Photon Bolt
Is this intended? How do I make Bolt.GlobalEventListener.OnEvent(MyEvent evnt) continue to receieve events after calling BoltNetwork.Shutdown().
I uploaded a public github repo showcasing the issue.
https://github.com/DrewProTag/PhotonBoltOnEventBugRepo
Reproduction steps with Unity Project:
1. Built Unity Project.
2. Run 2 clients.
3. Have Player 1 hit Host button.
4. Have Player 2 hit Join button.
5. Wait for Player 2 to connect to Player 1.
6. Have Player 1 hit Send Event button.
7. Observe Player 2 receives event via status text update.
8. Have Player 1 hit Shutdown.
9. Observe Player 1 and Player 2 disconnect.
10. Have Player 2 hit Host button.
11. Have Player 1 hit Join button.
12. Wait for Player 1 to connect to Player 2.
13. Have Player 2 hit Send Event button.
14. Observe Player 1 doesn't receive event.
I uploaded a public github repo showcasing the issue.
https://github.com/DrewProTag/PhotonBoltOnEventBugRepo
Reproduction steps with Unity Project:
1. Built Unity Project.
2. Run 2 clients.
3. Have Player 1 hit Host button.
4. Have Player 2 hit Join button.
5. Wait for Player 2 to connect to Player 1.
6. Have Player 1 hit Send Event button.
7. Observe Player 2 receives event via status text update.
8. Have Player 1 hit Shutdown.
9. Observe Player 1 and Player 2 disconnect.
10. Have Player 2 hit Host button.
11. Have Player 1 hit Join button.
12. Wait for Player 1 to connect to Player 2.
13. Have Player 2 hit Send Event button.
14. Observe Player 1 doesn't receive event.
0
Best Answers
-
-
I have tried finding and re-reading "Photon.Bolt.Internal.GlobalEventListenerBase Class" and I have seen how to solve the problem. Thank you very much.
Override this method and return true if you want the event listener to keep being attached to Bolt even when Bolt shuts down and starts again.
Returns
True/False
Example: Configuring the persistence behaviour to keep this listener alive between startup and shutdown.
public override bool PersistBetweenStartupAndShutdown() {
return true;
}
0
Answers
-
-
Oh my god, thank you. This was driving me nuts trying to figure out what was causing it.0
-
"You may have just mistyped the address or surfed an out-of-date link."
Please update this link.
0 -
I have tried finding and re-reading "Photon.Bolt.Internal.GlobalEventListenerBase Class" and I have seen how to solve the problem. Thank you very much.
Override this method and return true if you want the event listener to keep being attached to Bolt even when Bolt shuts down and starts again.
Returns
True/False
Example: Configuring the persistence behaviour to keep this listener alive between startup and shutdown.
public override bool PersistBetweenStartupAndShutdown() {
return true;
}
0
This discussion has been closed.