[Simple problem]Cannot join a room again
Options
Comments
-
Please post the code you used.0
-
Depending on how you tested, maybe 2 of the 4 users are not timed out before you try to re-join.
Make sure each client successfully disconnected / left the room. Else, the room might still exist when you join again.
You could check which ID you get, too. It must be 1, if the room is new (not still existing with some non-timed-out users).0 -
Tobias wrote:Depending on how you tested, maybe 2 of the 4 users are not timed out before you try to re-join.
Make sure each client successfully disconnected / left the room. Else, the room might still exist when you join again.
You could check which ID you get, too. It must be 1, if the room is new (not still existing with some non-timed-out users).
How to make sure no room exist/no player in the last room?
I am sure my MasterClient get the ID=1.And the client all disconnect from the room.Because I can create the new room with the same name0 -
khetag wrote:Please post the code you used.
Here is my left room code.
I send RPC to other clients to leaveroom and the MasterClient leave the room last one .
[code2=csharp][RPC]
void BackToTheLobby()
{
StopAllCoroutines();
PhotonNetwork.LeaveRoom();
}
public void OnLeftRoom()
{
Debug.Log("OnLeftRoom (local)");
StartCoroutine(Wait2secondsToExit());
}
IEnumerator Wait2secondsToExit()
{
yield return new WaitForSeconds(2);
Application.LoadLevel("StartScene");
}[/code2]0 -
orthers failed.0
-
Kaiserludi wrote:orthers failed.
I use PhotonServer,SelfHost0