Share Dynamic Information at Room
Options
Hi, friends.
I want know if Photon Unity Networking has a easy way to share a dynamic information in Room. I tryed to use CustomProperties, but, for example, i did create an Empty Dictionary and did put it in the CustomProperties, when joined at room, i did populate that Dictionary, but, when joined the room with another player, the Dictionary was Empty to the new player. I want that the Dictionary keeps the information that was created by the first player at the room.
How can i do this?
Here is a bit of code where i create the Room.
When the first player joins the room, the dictionary "winds" is populated, so, when the second player joins the room, the dictionary "winds" is empty.
I want that this information could be dynamic and shared to all new players that joins at room.
I want know if Photon Unity Networking has a easy way to share a dynamic information in Room. I tryed to use CustomProperties, but, for example, i did create an Empty Dictionary and did put it in the CustomProperties, when joined at room, i did populate that Dictionary, but, when joined the room with another player, the Dictionary was Empty to the new player. I want that the Dictionary keeps the information that was created by the first player at the room.
How can i do this?
Here is a bit of code where i create the Room.
base.OnPhotonRandomJoinFailed (codeAndMsg); string roomName = "Room" + Random.Range (1, 99999); string masterName = PhotonNetwork.playerName; RoomOptions roomOptions = new RoomOptions () { maxPlayers = 4 }; ExitGames.Client.Photon.Hashtable customProp = new ExitGames.Client.Photon.Hashtable (); customProp.Add ("master", masterName); Dictionary<string, string> winds = new Dictionary<string,string> (); customProp.Add ("winds", winds); roomOptions.customRoomProperties = customProp; roomOptions.customRoomPropertiesForLobby = new string[] {"master"}; PhotonNetwork.CreateRoom(roomName,roomOptions,TypedLobby.Default);
When the first player joins the room, the dictionary "winds" is populated, so, when the second player joins the room, the dictionary "winds" is empty.
I want that this information could be dynamic and shared to all new players that joins at room.
0