Users can't join the existing room.
Options
mhhk88
✭
Sometimes users create new room even though there is a room available.
It often happens on iPhone, 1-2 times in 5 tries. I'm not 100% sure but I haven't seen this on android phones.
This is my source code.
Any advice will be so appreciated. Thanks for reading.
It often happens on iPhone, 1-2 times in 5 tries. I'm not 100% sure but I haven't seen this on android phones.
This is my source code.
public void JoinRandomRoom() { PhotonNetwork.JoinRandomRoom(); } void OnPhotonRandomJoinFailed() { CreateNewRoom(); } void CreateNewRoom() { string roomName = "SF" + Random.Range(0, 100000).ToString("D6"); RoomOptions roomOptions = new RoomOptions(); roomOptions.IsOpen = true; roomOptions.IsVisible = true; roomOptions.MaxPlayers = 15; roomOptions.PlayerTtl = 5000; PhotonNetwork.CreateRoom(roomName, roomOptions, TypedLobby.Default); }I'm using PUN 1.91 and Unity 2019.1.0f2 Personal.
Any advice will be so appreciated. Thanks for reading.
0