Player Can’t Rejoin Same Room After Game Restart (Quick Join Creates New Room) (Netcode- Relay)
Hi everyone,
I’m having an issue with my multiplayer game using Netcode. When a player closes the game without properly disconnecting, and then reopens the game, they are unable to rejoin their previous room using the “Quick Join” functionality. Instead, it creates a new room.
Here is my OnPause function to handle oculus quest close:
private void OnApplicationPause(bool pause)
{
if (pause)
{
Lobbies.Instance.RemovePlayerAsync(currentLobby.Id, AuthenticationService.Instance.PlayerId);
NetworkManager.Singleton.Shutdown();
Debug.LogError($"Player {AuthenticationService.Instance.PlayerId} removed from lobby {currentLobby.Id}");
if (NetworkManager.Singleton.IsHost)
{
Lobbies.Instance.DeleteLobbyAsync(currentLobby.Id);
}
Debug.Log("Disconnected from lobby and network.");
connectionState = ConnectionState.Disconnected;
Application.Quit();
}
}
Any ideas