Leave & Quit from a Game Session to a Lobby
Hi,
I wanted to implement a feature where players can leave the game session (after Runner.StartGame(...)) and return back to the Shared Lobby. This assumes they joined the lobby initially before calling Runner.StartGame(...).
Do I have to shutdown the runner, start the runner and rejoin the lobby manually? From the Application Loop and Karts sample, both disconnect from the game entirely upon leaving the session.
Answers
-
I am also looking for the answer to this question.
I searched but couldn't find it.
0 -
- void Update()
- {
- if (Input.GetKeyDown(KeyCode.Escape))
- {
- PhotonNetwork.DestroyPlayerObjects(PhotonNetwork.player);
- PhotonNetwork.LeaveRoom();
- PhotonNetwork.LoadLevel(0);
- }
- }
0 -
@Flaemnova Had same question. I find the examples a bit confusing as they all seem to be switching scenes constantly when connecting to parts of Fusion: lobby, staging, gameover, etc. I gather this is just showing off how Fusion is scene agnostic? And doesn't loose the session in between loads? I don't know, but it's not how I am used to working the problem in Unity.
The Fusion Application Loop example in the Technical Examples is the one I found that simply shows the whole game loop from connect to disconnect.
0