Problem with PhotonPlayer

Options
Hello! I have a problem as stated in the title. I'm using void OnPhotonPlayerConnected(PhotonPlayer player) {}, but I get an error saying that PhotonPlayer could not be found. Thank you beforehand.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @Dhicci,

    Thank you for choosing Photon!

    You are probably looking at the wrong version of the docs.
    Here is the "Migration Guide from PUN 2".
  • Dhicci
    Options
    Yep! That was the issue. Thanks a lot!
  • Foxson
    Options
    I updated my project from PUN 1 to PUN 2 and I have this issue I changed OnPhotonPlayerConnected(PhotonPlayer player) to OnPlayerEnteredRoom(Player player) but it didn't fixed it
  • Tobias
    Options
    You have to register for callbacks in PUN 2. If you inherit from MonoBehaviourPunCallbacks and override OnEnable / OnDisable, make sure your implementation calls the base function.