Can I change room name after joined the room?

Hi,

can I change the room name after the Master Player has joined the room?

I tried:
PhotonNetwork.room.name = sceneryName;

That name is not changed on the Photon server.

My problem is, I want to load the actual scenery when a player connects to a hidden room which is shown by the find friends function.

All the best,
Klaus

Comments

  • Hi,

    solved it...

    the master user which opens a room can select visible/invisible and when the room is invisible, I change the room name to the scenery name. When now somebody is searching for his friends which are located in a invisible room, the room is shown and he can join and the scenery will be loaded automatically.

    While the room is open, the master cannot change the visible status... but he can change the 'isOpen' tag.

    All the best,
    Klaus
  • Making the room invisible is a good way to hide it from randomly joining players, yes.
    You shouldn't change the room's name though. It's the ID by which we find and handle the room.
    Better: Use a room property to store the current scenery name. The props are available for new players before events come in, so you can pause the message queue and load the scenery, before you turn on the queue again when you loaded.
    PhotonNetwork.LoadLevel and PhotonNetwork.automaticallySyncScene = true will do this for you, too.