Modifying Room Properties

Hi there,

I'm having this little trouble understanding the docs in this case, just wondering how to use OpSetProperties to set room properties.
I want to close a room and i've read that in order to do so, you must set the room properties to IsOpen and IsVisible. I just can't figure out how to set these.

Can anyone point me in the right direction?
thanks
Pete

Comments

  • There is a less clear (clever?!) distinction between well known properties (like "visible") and custom properties (which you set via SetCustomProperties). The latter must have string-typed keys and don't directly modify the room.
    Use PhotonNetwork.room.visible = false to hide a room from lobby and matchmaking. Someone who knows the roomname can still join!
    Use PhotonNetwork.room.closed = false to keep users from joining the room, even if they know the roomname.
  • Great, thanks!
  • Just fyi, I think it's PhotonNetwork.room.open = false;
Sign In or Register to comment.