Hiding room

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.

Hiding room

clabs
2014-01-24 11:05:29

Hi, In my game I am hiding room after maximum number of players are there in the room. Code: PhotonNetwork.room.open = false; PhotonNetwork.room.visible = false;

In my game we have a functionality that masterclient can rejoin the game. In this case when I disconnect from Photon server I am unable to join the room as room is not open and invisible. How can make that room visible? I tried to make room visible on non master clients but the room is still not visible. How can I make the masterclient to rejoin the same room? Also is there any property that can be used to make room invisible (except open or visible) after all the players have joined the room?

Comments

clabs
2014-01-27 06:34:40

Hi, Anyone please help me

Tobias
2014-01-27 12:20:39

If the Master drops out, some other player becomes master. In this case, open the room again (room.open = true). It's still hidden from matchmaking but anyone who knows the room's name can join it. If the Master Client crashed and didn't send a proper "disconnect", then it's old connection might take a few seconds to time out. In that time, the players still assume the dropped Master is there and won't open the room. If your Master wants to re-join really quick, this can be a problem.

Why do you ask for "another" way to make rooms invisible? It's the only way to do.

clabs
2014-01-28 05:17:49

I need to display a list of visible rooms. If that room is not visible for matchmaking then how I can show that room in list of available rooms?

Tobias
2014-01-29 16:47:17

You want to hide it but show it in a list of rooms? I am confused! :) Please explain the plan.

clabs
2014-01-31 04:23:09

I want to hide the room when all players have joined the room, but when a player leaves a room I want to make that room visible again so that other players can join that room.

Tobias
2014-02-03 13:32:54

Set isVisible respectively. It should work as expected.

Back to top