Will OnDisconnected From Photon callback be executed when a player exits the game ?

Hi,

I'm trying to test if the disconnection callbacks are called whenever I unplay Unity or exit my game.

Thank you.

Comments

  • [Deleted User]
    edited November 2017
    Hi @rokugatsu,

    edit: sorry, I misread the question.
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited November 2017
    Hi @rokugatsu,

    Just to avoid any confusion or misunderstanding.

    void OnDisconnectedFromPhoton()
    Will be called when the local client is disconnected from all Photon servers but the app is still open.
    This happens after unexpected disconnect (another callback should be called first) or if you call PhotonNetwork.Disconnect().
    If you just exit the game nothing will be called.

    What do you mean by "unplay"?
    Do you mean stop playing from Unity Editor?

    In this case, the callback will not be called as well.