Here's how I create the room:
Here's how I display the information. I call this when the game received OnReceivedRoomListUpdate.
public void CreateRoom(string name, string mode, string map, int maxPlayers) {
popupCreateLobby.SetActive(false);
popupConnecting.SetActive(true);
ExitGames.Client.Photon.Hashtable roomSettings = new ExitGames.Client.Photon.Hashtable() {
{ "name", name }, { "mode", mode }, { "map", map }
};
string[] lobbyProperties = { "name", "mode", "map" };
RoomOptions options = new RoomOptions();
options.IsVisible = true;
options.IsOpen = true;
options.MaxPlayers = (byte) maxPlayers;
options.CustomRoomPropertiesForLobby = lobbyProperties;
options.CustomRoomProperties = roomSettings;
PhotonNetwork.CreateRoom(null, options, TypedLobby.Default);
}
The log displays:
public void SetRoomInfo(RoomInfo roomInfo) {
this.roomInfo = roomInfo;
Debug.Log(roomInfo.ToStringFull());
textGameName.text = (string) roomInfo.CustomProperties["name"];
textGameMode.text = (string) roomInfo.CustomProperties["mode"];
textMapName.text = (string) roomInfo.CustomProperties["map"];
textPlayerCount.text = roomInfo.PlayerCount + " / " + roomInfo.MaxPlayers;
}
As you can see, the customProps is empty even though I set them properly when I created the room. What gives?
Room: 'xxxx' visible,open 1/0 players.
customProps: {}