Quantcast
Channel: Recent Discussions — Photon Engine
Viewing all articles
Browse latest Browse all 15755

How can I allow a disconnected player (and only him !) to connect back in the game ?

$
0
0
Hi everyone,

I'd like to handle the case of a disconnected player who would like to come back in the game. Ideally, I'd like the room to be invisible and/or non-joinable for everyone except for the disconnected player(s).
I'm a beginner on PUN, and I tried to manipulate the ExpectedUsers feature, but I'm not sure I'm on the right way. I have encountered a few problems :
1. I'd like to reserve the slots for the current players but only from a special moment (basically, when the game "really" starts. But it seems impossible to modify the ExpectedUsers field outside the JoinRoom / CreateRoom call).
2. When the disconnected player comes back in the lobby and get the room list, I can't find a way to test if a room has an ExpectedUsers field which contains my own ID (ExpectedUsers are not available in the RoomInfo ?)
3. Again, ideally, the room should be visible only for the disconnected player(s). Actually, it might be the same problem. If I could test if a room has an ExpectedUsers field which does NOT contain my own ID, I could simply make it not appear in the UI.

So... What can I do ?

Viewing all articles
Browse latest Browse all 15755

Trending Articles