public void Start() { Inventory inv = new Inventory(Items.ArmorPlate, Items.HealthPot); XMLWriter.SerializeObject(inv, typeof(Inventory)); Inventory newInv = (Inventory)XMLWriter.DeserializeObject(typeof(Inventory)); Debug.Log(newInv.playerInventory[0] + " " + newInv.playerInventory[1]); }