'PhotonNetwork' does not contain a definition for 'Playerlist'
Options
The script is using the namespaces; Photon.PUN and Photon.Realtime. PhotonNetwork can't recognize 'Playerlist' I wonder what can cause this issue.
0
Comments
-
Yo
You should have tried to show potential fixes it may have told you that it's not Playerlist but PlayerList
1 -
I already tried alternative spellings. Potential fixes are all about generating fields and properties.
Any ideas?
0 -
Actually weird
Could you go at line 365 of PhotonNetwork class? It should be this definition for PlayerList/// <summary> /// A sorted copy of the players-list of the current room. This is using Linq, so better cache this value. Update when players join / leave. /// </summary> public static Player[] PlayerList { get { Room room = CurrentRoom; if (room != null) { // TODO: implement more effectively. maybe cache?! return room.Players.Values.OrderBy((x) => x.ActorNumber).ToArray(); } return new Player[0]; } }
1 -
https://doc-api.photonengine.com/en/pun/v2/class_photon_1_1_pun_1_1_photon_network.html#a9fd512f2faefb176298380c70464f1a4
Jep, you better just reimport the photon asset.0 -
That was weird indeed. The exact same definition of PlayerList exists in PhotonNetwork class; but is defined as 'player'. I wonder what could have caused this alteration in the name only while the content remains the same. Anyway, glad it's resolved.
1