Problem with RaiseEvent() and PhotonPlayer[]

Options
FGk
FGk
Hi guys,

I'm trying to pass a PhotonPlayer[] as a "content" argument in my RaiseEvent() but it seems like PhotonPlayer arrays aren't included in Photon Custom Types.

Do you have any idea on how it could be done alternatively?

Comments

  • Hi @FGk,

    instead of the PhotonPlayer object itself you can use the player's ID and furthermore pass an array of int values as content parameter. The receiving clients can iterate through PhotonNetwork.playerList and compare each received ID with the ID of each PhotonPlayer stored in the playerList to have access to the same information.
  • FGk
    Options
    Thank you for your reply @Christian_Simon.

    I'm sure your approach will work but eventually I found another way to solve my problem. I am sending the PhotonPlayer object as content parameter and I am doing all the stuff on my OnEvent() function.