Close room even if others are in it?
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on PUN.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
Close room even if others are in it?
doomie22
2014-01-21 02:37:15
Hi all,
I have a server that creates a room at the moment on cloud, but I want to be able to close the room and boot all the players. Is this possible?
Thanks,
Doomie
Comments
[Deleted User]
2014-01-21 12:37:16
Hi Doomie,
You can use Room.open property for closing the room.
Can you elaborate on that please as room.open doesn't exist that I can see.
Thanks
[Deleted User]
2014-01-21 16:34:14
Use PhotonNetwork.room for getting and accessing the properties of the room you are currently in.
Setting room.open to false will not kick players from a room. It will keep others from joining. The "visible" property removes the room from the lobby's listing.
You can kick everyone by RPC, if you wanted to. Just send a RPC and implement the method for it to leave the room.
Back to top