PhotonNetwork does not contain a definition for player

The whole answer can be found below.

Please note: The Photon forum is closed permanently. After many dedicated years of service we have made the decision to retire our forum and switch to read-only: we've saved the best to last! And we offer you support through these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

PhotonNetwork does not contain a definition for "player"

Unreality
2020-02-03 21:09:20

I've searched for over an hour now, and can't find it.

'PhotonNetwork' does not contain a definition for 'player'

I've also tried different spellings, but still can't. I am trying (nothing works yet...) with player custom properties.
Any help ?

Comments

Unreality
2020-02-04 16:14:30

I still can't understand it. I've tried to re-import photon pun2, and searched more and more about it, but can't understand what is wrong. maybe the mistake is super basic, but I'm begining at Photon

Unreality
2020-02-05 20:26:32

anybody ?

hardartcore
2020-02-06 08:35:08

If you are searching for the old PhotonNetwork.player, the PUN2 version is: PhotonNetwork.LocalPlayer.
Here you can find more information about the migration: https://doc.photonengine.com/en-us/pun/v2/getting-started/migration-notes

Unreality
2020-02-07 15:50:10

thanks a lot, that was my problem.

Back to top