Attempting to rejoin room and getting "User does not exist in this game".

Options
I have a room set up as -
RoomOptions roomOptions = new RoomOptions();
                roomOptions.IsVisible = false;
                roomOptions.MaxPlayers = 5;
                roomOptions.PlayerTtl = 3600;
                roomOptions.PublishUserId = true;
                PhotonNetwork.JoinOrCreateRoom(roomName, roomOptions, TypedLobby.Default);

I have two players in the room and then I close one of them by stopping the play mode in Unity).
Upon loading the game again I do -
string userId = PlayerPrefs.GetString("userId");
            if (userId != "")
            {
                PhotonNetwork.AuthValues = new AuthenticationValues(PlayerPrefs.GetString("userId"));
            }
            PhotonNetwork.ConnectUsingSettings();

This seems to work as I get the same UserId as before.
However, when I user "RejoinRoom" It fails with the message "User does not exist in this game".

The room name is correct.

Please assist.

Comments

  • emotitron
    Options
    I am not sure that stopping play in Unity is certain to simulate a soft disconnect. It may raise an event before shutting down, letting the relay know that it is disconnecting. In that case it becomes a hard disconnect and that player cannot rejoin any longer.
  • emotitron
    Options
    Also keep in mind that TTL is in milliseconds, so your PlayerTTL there is 3.6 seconds.