How does one know when another player's customProperty changed?
Options
Hi! When using PhotonNetwork.SetPlayerCustomProperties(properties), the documentation says it also updates the value for others. My question is, how can I know on the other client when a property of the other player changed? Is there some kind of event I can subscribe to, e.g. in OnEvent(EventData photonEvent) in my MonoBehaviourPunCallbacks object? Thanks!
0
Comments
-
I just realized it's event PropertiesChanged, (byte) 253, in above-mentioned OnEvent().
All is solved then for now, I'm leaving this thread for anyone who might stumble on it in search looking for the same answer.0 -
Great, that's even better! Thank you!0
-
Sorry, where would I put the OnPlayerPropertiesUpdate()? (I have a Person object which derives from MonoBehaviourPun, and includes a photonView.Owner, but in that Person class it won't fire.)0
-
Thanks! (It looks like the IInRoomCallbacks are of a more global, above-Person nature, so if I implement this approach I might move them to my generic network handler where I'm currently already handling the PropertiesChanged PropertiesChanged.)0