How to call OnDisconnect?

Seemingly ALL methods related to this behavior is deprecated, docs doesn't cover this meaningfully (Says its derived from IPunCallbacks which doesn't exist, and I'm deriving from MonoBehaviourPunCallbacks which holds behavior to connect, so why not the onDisconnect?)

I've tried OnFailedToConnect, OnFailedToConnectToMasterServer, OnDisconnectedFromServer etc. all those that pun suggests, and the OnDisconnectedFromPhoton seemingly just doesn't exist. I have just downloaded the most recent version of pun?

Best Answer

Answers

  • Avalin
    Avalin
    edited February 2019
    I learned from "Migration notes" that was suggested to another one with unrelated problems, that the interface now is IConnectionCallbacks. Not that that helped me, I still dont see any of the relevant methods being able to call... (OnDisconnectedFromPhoton, OnConnectionFail OnFailedToConnectToPhoton() etc...) (Also why couldn't I edit above post, when I can edit this for seemingly 1 day, and above is only less than an hour ago)
  • Ah I see. My mistake was assuming I would still need to have a callback and not just call them inside methods. Thank you.