Close room even if others are in it?

The whole answer can be found below.

Please note: The Photon forum is closed permanently. After many dedicated years of service we have made the decision to retire our forum and switch to read-only: we've saved the best to last! And we offer you support through these channels:

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).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

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.

doomie22
2014-01-21 15:17:40

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.

Tobias
2014-01-23 11:51:29

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