title: How to save dictionary data or array list data to playerprefs more effeciently?
body: <p>Does anyone know how to save dictionary data or array list data to playerprefs more efficiently?</p>
  
  <p>For example I have a class item:</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  using System.Collections.Generic;
  
  // Make Class Item
  public class item {
      public string itemName;
      public int itemID;
      public string itemDesc;
      public string itemIcon;
      public GameObject itemModel;
      public int itemTime;
      public int hightprice;
      public int stdprice;
      public int itemStock;
      public int harvest;
      public RawTree rawTree;
      public ItemType itemType;
      public ItemProd itemProd;
      public ItemLocation itemLocation;
      public ItemMerchant itemMerchant;
      public int Lvlunlock;
      private string baseName;
      public int spawnRate;
      public int minqtySpawnBuy;
      public int maxqtySpawnBuy;
      public int minqtySpawnSell;
      public int maxqtySpawnSell;
      public int itemExp;
  
  
      public enum ItemType {
          Raw,
          Admirable,
          Valuable
      }
  
      public enum RawTree {
          BigTree,
          SmallTree,
          Field,
          None
      }
  
      public enum ItemProd {
          Corps,
          Dairy,
          JuiceJamMaker,
          Kitchen,
          Bakery,
          CraftHouse,
          ChickenCoop,
          FishingSpotMountain,
          CowPasture,
          LunaMine,
          PigPen,
          FishingSpotLake,
          TropicalWood,
          SheepPasture,
          FishingSpotSea,
          Beebox,
          HomeIndustry,
          Merchant
      }
  
      public enum ItemLocation { 
          Home,
          Orchard,
          Forest
      }
  
      public enum ItemMerchant { 
          Margaret,
          Lucy,
          Bobby,
          Roger,
          Grace
      }
  
      public item (string name, int ID, string desc, int harvestx, int time, int stdpricex, int hightpricex, int stock, int Lvlunlockx, RawTree RawTree, ItemType type, ItemProd prod, string folderx, ItemLocation location, ItemMerchant merchant, int rate, int minspawnBuy, int maxspawnBuy, int minspawnSell, int maxspawnSell, int Exp) {
          itemName = name;
          itemID = ID;
          itemDesc = desc;
          harvest = harvestx;
          itemTime = time;
          stdprice = stdpricex;
          hightprice = hightpricex;
          itemStock = stock;
          Lvlunlock = Lvlunlockx;
          rawTree = RawTree;
          itemType = type;
          itemProd = prod;
          itemIcon = folderx;
          itemLocation = location;
          itemMerchant = merchant;
          spawnRate = rate;
          minqtySpawnBuy = minspawnBuy;
          maxqtySpawnBuy = maxspawnBuy;
          minqtySpawnSell = minspawnSell;
          maxqtySpawnSell = maxspawnSell;
          itemExp = Exp;
      }
  
      public item() {
  
      }
  }
  </code></pre>
  
  <p>Then i will create a list item :</p>
  
  <pre><code>public List&lt;item&gt; items = new List&lt;item&gt; ();
  </code></pre>
  
  <p>First:
  How do you save the items to playerprefs more effecient ?</p>
  
  <p>For example i have data on dictionary:</p>
  
  <pre><code>public Dictionary &lt;string, Dictionary &lt;string, int&gt; &gt; productSellMargaret;
  </code></pre>
  
  <p>Second:
  How to save the productSellMargaret to playerprefs more efficiently?</p>
  
  <p>How do I save both of them to playerprefs so I can continue to call the data when I exit the game and play again with continue data?</p>