Hi,
We want to create rooms, which can be listed/e.g. seen only by certain users (
player-a/b/c).
Creating the Room:
RoomOptions roomOptions = new RoomOptions();
roomOptions.MaxPlayers = 8;
roomOptions.PublishUserId = true;
roomOptions.IsVisible = false; //not everybody should see this room
roomOptions.IsOpen = true;
roomOptions.CustomRoomPropertiesForLobby = new string[] { "C0" };
roomOptions.CustomRoomProperties = new Hashtable() { { "C0", "' player-a player-b player-c '" } }
TypedLobby typedLobby = new TypedLobby();
typedLobby.Name = GetTypedLobbyName();
typedLobby.Type = LobbyType.SqlLobby;
b = PhotonNetwork.CreateRoom(roomName,
roomOptions,
typedLobby);
Filtering the Room:
TypedLobby sqlLobby = new TypedLobby(GetTypedLobbyName(),
LobbyType.SqlLobby);
string sqlLobbyFilter = "C0 LIKE ('% " + "player-a" + " %')";
PhotonNetwork.GetCustomRoomList(sqlLobby, sqlLobbyFilter);
This should show in "
OnReceivedRoomListUpdate" some results, but the method is not called.
It gets called when "roomOptions.IsVisible" is set to "true", but in this case, the "sqlLobbyFilter" and "PhotonNetwork.GetCustomRoomList" does not make much sense, because everybody can see the room (without setting the filter, or calling GetCustomRoomList).
Have you an Idea?The only solution we came up with:
Store room names somewhere else (web/api) and retrieve the names from there and call "JoinRoom" explicitly with the names from the "web/api"?
Thank you very much