OnPlayerLeftRoom is being called twice

I've been beating my head against this for a few hours. I'm really not sure how to figure out what's going on. I put a breakpoint in the PlayerLeftRoom callback and verified that it's only on the scene once. I verified this but removing that script and the method went from being called twice to not being called at all.

I create the game on Unity and then create a second client from a build. both players join the game and the client outside of Unity IDE leaves.

I got images of the callstack and it looks the same on each call to the method.

Image of the callstack:
https://imgur.com/GWRGCtv

Comments

  • Hi @Jesse,

    Thank you for choosing Photon!

    Did you make sure the callback is not triggered for two different players.
    Otherwise, it could be expected in case PlayerTTL > 0: first time the actor becomes inactive, the second time is when the actor's PlayerTTL expires and is removed from the room.
  • That's possible. If a client calls PhotonNetwork.LeaveRoom(), would it cause that to happen?
  • That was the issue. I set playerTTL to 0 and now I just get the call once! Thank you
Sign In or Register to comment.