Problems leaving Room

Options
Hello :smile:

I am using Photon PUN 2 for a game I am developing and didn't have any issues so far until now where I am trying to leave the room and return to the menu scene.

This is the Code I am using and the ErrorLog in the console:
https://imgur.com/a/EmKdWmB

I tried testing a bit and it seems like I do leave the room but the playerstate is stuck on leaving, so the OnLeftRoom() is never called. I also tried PhotonNetwork.Disconnect() instead of PhotonNetwork.LeaveRoom() but had the same result.

I'd apreciate any help since I can't seem to find a solution.
Thanks in advance.

Answers

  • Nimeruun
    Options
    I found the Problem.

    I had a Time.TimeScale = 0f on one of my GameObjects in OnDestroy() so that somehow messed with the server connection since OnDestroy() was called when I changed the scene.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @Nimeruun,

    Thank you for choosing Photon!

    Read this.