OnPhotonCustomRoomPropertiesChanged called if properties changed before you join the room?

Options
I am using the setting of a custom room property to some future PhotonNetwork.time in order to synchronize players that have already joined to a specific start time. The game does however allow late joiners, and it does not appear that OnPhotonCustomRoomPropertiesChanged fires off for players who were not yet in the room when the property was changed. These late joiners will need their game time set to whatever the game length is minus whatever time has passed.

1. Is that true? OnPhotonCustomRoomPropertiesChanged only fires for clients current in the room when property is changed?

It would seem a necessary method is to check the property upon entering the room, and if the property is not set, wait for the OnPhotonCustomRoomPropertiesChanged to get fired when it does get set. This leaves open the possibility that you will check for a custom property that does not exist.

2. What is returned in this case?

3. Is there a better method?

Comments

  • Spektre
    Options
    Could not find an edit for the Forum.

    As a follow up. assuming I set the start time "tr" as:

    Hashtable timeProps = new Hashtable() { { "tr", this.timeToStart } };

    How do I read it back?
  • Spektre
    Options
    I do see you can read out a complete roomInfo string, but it seems kludgey to have to parse that for your parameter. Is there a more direct method to read a customRoomProperty?

  • Spektre
    Options
    OK, I found a method to read customRoomProperties. IMO it is not well documented.

    The method laid out above does work.

    Check for the property upon loading the level, if not found wait for it.