Seems like the last bit I tried in the previous post does work, but only if you retrieve it with PropertyOfMyRoom, and not with RoomProperty.
I can only retrieve the room property after one has joined the room, but not before, even with the "set properties listed in the lobby" before creating the room. Why's that?
Properties listed in lobby is a parameter of room creation. So they should be set before room creation.
Lobby provides the list of currently existing rooms for players joined to the lobby (not to a room). It also exposes room properties which were marked as "listed in lobby" during room creation. To get property value, you need to pass room name and property name to RoomProperty.
Normally, client in a lobby should handle "On room list update" event which triggered by any room creation, closing and and "listed in lobby" properties values change.
Currently plugin does not provide info on which exact rooms have changed (though Photon js api does). So you most likely need to rescan entire room list in lobby and read properties. Like demo-test does in addRoomToList function:
- iterate from 0 to Photon.RoomCount - 1
- get Photon.RoomProperty(Photon.RoomNameAt(loopindex), "level")
If you call these methods while joined to a room, most likely you will get rooms state at the moment of joining to a room which does not make sense.