Can't Log back when switching scene

Options

So basically the issue im having is if the Player/Master client, Closes the application, they can log back and get their prefab back and controll it.

the problem comes when Im trying to take the player back to the main menu (aka Scene(0)) when I make the player leave room, and gp back to the main menu, when Im trying to log back he gives me the following error :

Join to room failed because : Found inactive UserId '88d50a16-fe4f-46ec-8f0e-6613705315a7', but not rejoining (JoinMode=0).And 32749

But If I close the app, and reopen it - it let me to log back.

So what the different between the callbacks of App closes to PhotonNetwork.LeaveRoom?

  • im not using Rejoin or reconnectandrejoin methods. Im using my own way to give the player back his prefab and controll.
  • the room option does have : * roomOptions.PlayerTtl = -1; *timeoutroomOptions.CleanupCacheOnLeave = false;

im using these to go back to the first Scene:

The LeaveRoom called by button click.

  public void LeaveRoom()

  {

    PhotonNetwork.Disconnect();

  }


  public override void OnLeftRoom()

  {

    SceneManager.LoadScene(0);

  }


  public override void OnDisconnected(DisconnectCause cause)

  {

    PhotonNetwork.LeaveRoom();

  }