OnPhotonCustomRoomPropertiesChanged isn't being called... what am I missing?

Options
    public void OnPhotonCustomRoomPropertiesChanged(PhotonHashtable propertiesThatChanged)
    {
        Debug.Log("World manager noticed custom room properties change...");
        ++masterInteractibleTally;
        foreach (string key in propertiesThatChanged.Keys)
...

I've recently changed over to using custom properties to manage loot in my game world. Everything's working fine (custom properties ARE changing; I can check them via PhotonNetwork.CurrentRoom.CustomProperties[]), but the WorldManager behaviour that's supposed to inform the loot items of remote changes (to avoid a lot of polling) just... isn't getting told when it happens. The line of logging in the snippet above never appears.

What am I doing wrong?

Thanks.

Comments

  • Peeling
    Options
    Okay, I figured it out: that method is no longer how things are done.

    In case anyone else blunders into the same problem, here's how to get it to work for YOUR WorldManager class:
    public class WorldManager : MonoBehaviour, IInRoomCallbacks
    {
    
        void Start()
        {
             PhotonNetwork.AddCallbackTarget(this);
        }
    
        public void OnRoomPropertiesUpdate(ExitGames.Client.Photon.Hashtable propertiesThatChanged)
        {
            Debug.Log("World manager noticed custom room properties change!");
        }
    }