Change a public room to private during in-room runtime?

Options
ZeoWorks
ZeoWorks ✭✭
Hi all! I've been using PUN for quite some years now and I love it. :)

I just have one question though, is it possible for a player to host a public room, then... when in game.. have the ability to change it to a private room runtime? Thank you in advance!

From what I know you can make a private room by adding "PRIVATE_" to the beginning of the room name... maybe if its possible to change the room name during in-game runtime I could use that method?

~Sean

Comments

  • Tobias
    Options
    Hehe.
    You can't change the room's name anymore but you can hide it. Set room.visible = false when you no longer want others to join randomly and to hide it from a lobby's list (if any).
    Other users who know the room's name can still join. They just don't do by accident.
    You can also close it. Then users can't join anymore, even if they know the room name. Set .open = false.

    Oh. Forgot! Cool you like and use Photon / PUN already for such a long time! :)