how to Update Room Property for lobby?
Options
Cariaga
✭
//inside the lobby scene and lobby script foreach (var roomInfo in PhotonNetwork.GetRoomList()) { Debug.Log((string)roomInfo.CustomProperties["creator"]); } //in the game scene and game script PhotonNetwork.room.CustomProperties["creator"] = Random.value.ToString();
error resulting into null
0
Comments
-
i'm still getting null value do i need to place some sort of PunCallback?
i tested both lobbyforeach (var roomInfo in PhotonNetwork.GetRoomList()) { Debug.Log((string)roomInfo.CustomProperties["creator"]); }
and game scriptPhotonNetwork.room.SetCustomProperties(new Hashtable {{"creator", Random.value.ToString()}});
inside update0 -
When you create rooms you should make sure "creator" is a custom room property visible from/to the lobby as follows:
roomOptions.CustomRoomPropertiesForLobby = new string[] {"creator"};
1 -
it works finally thanks alot0