What is the reason for rooms to become invisible?

Here is a code I use to create room on cloud Photon server and to connect clients to it:

private static Coroutine updateCoroutine; public override void OnConnectedToMaster() { Debug.Log("OnConnectedToMaster"); updateCoroutine = StartCoroutine(this.UpdateGameListCor()); } private IEnumerator UpdateGameListCor() { TypedLobby sqlLobby = new TypedLobby("myLobby", LobbyType.SqlLobby); string sqlLobbyFilter = "C0 = 1"; // request games with mode 0; while (true) { PhotonNetwork.GetCustomRoomList(sqlLobby, sqlLobbyFilter); yield return new WaitForSeconds(1f); } } public override void OnRoomListUpdate(List<RoomInfo> roomList) { Debug.Log("OnRoomListUpdate : " + roomList.Count + " rooms"); // code to show rooms on UI } public void CreateNewGameButtonClick() { Debug.Log("payer connected: " + PhotonNetwork.IsConnected); if (PhotonNetwork.IsConnected) { LoaderModal.Show(); StopCoroutine(updateCoroutine); RoomOptions roomOptions = new RoomOptions(); roomOptions.IsVisible = true; roomOptions.MaxPlayers = 4; // in this example, C0 might be 0 or 1 for the two (fictional) game modes roomOptions.CustomRoomProperties = new ExitGames.Client.Photon.Hashtable() { { "C0", 1 } }; roomOptions.CustomRoomPropertiesForLobby = new string[] { "C0" }; // this makes "C0" available in the lobby // let's create this room in SqlLobby "myLobby" explicitly TypedLobby sqlLobby = new TypedLobby("myLobby", LobbyType.SqlLobby); PhotonNetwork.CreateRoom(GameStorage.PlayerName, roomOptions, sqlLobby); Debug.Log("game created"); } } public override void OnCreatedRoom() { Debug.Log("OnCreatedRoom"); } public override void OnJoinedRoom() { Debug.Log("OnJoinedRoom: " + PhotonNetwork.CurrentRoom.Name); }

This code worked properly for some short time. Rooms were created properly and appeared on UI, clients could connect to them without any errors. But suddenly (no code changes were applied) rooms became invisible. OnRoomListUpdate() method started receiving empty list. Although the room is created properly and has IsVisible property set to true. Player who creates room receives OnJoinedRoom() callback where I can see created room details.

So, what am I doing incorrectly?

Thanks in advance.

Best Answer


This discussion has been closed.