I am using Photon PUN with Unity. I have some static classes that track player data in my game. Here is an example of a method to update data...
public static void IsSeated(bool value)
{
Room room = PhotonNetwork.room;
Hashtable PlayerSeat1 = new Hashtable();
object[] seat1 = (object[])room.customProperties["seat1"];
seat1[0] = value;
PlayerSeat1.Add("seat1", seat1);
room.SetCustomProperties(PlayerSeat1);
}
The problem is when I update this hashtable all my other room data is over written with the changes. All of my hashtables have distinct keys. I would greatly appreciate any help.