Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

Room CustomProperties is not updating with values

$
0
0
While creating a room, i am updating both the CustomRoomProperties and CustomRoomPropertiesForLobby

RoomOptions roomOptions = new RoomOptions() { };
roomOptions.MaxPlayers = (byte) maxPlayers;
string[] customRoomProps = new string[2];
customRoomProps[0] = tierNo.ToString();//int variable
customRoomProps[1] = area.ToString();//enum variable
roomOptions.CustomRoomPropertiesForLobby = customRoomProps;
roomOptions.CustomRoomProperties = new ExitGames.Client.Photon.Hashtable(2) {{"TierNumber", tierNo}, {"GameArea", area}};
PhotonNetwork.CreateRoom(null, roomOptions, TypedLobby.Default);


but when i am trying to get the list of rooms for other players
RoomInfo[] roomInfos = PhotonNetwork.GetRoomList();
RoomInfo tempRoomInfo = roomInfos[0];
print(tempRoomInfo.CustomProperties.Count);// this is giving 0

Can some one help?

Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>