示例#1
0
 /// <summary>
 /// Call this to save all assets JSon data
 /// </summary>
 public void SaveAssets()
 {
     foreach (var asset in SavableAssetArray)
     {
         if (Saving.ContainsKey(asset.name))
         {
             // save data value to its key
             Saving.SaveData(asset.name, asset.Save());
         }
         else
         {
             // If the key is not set yet then add it with its values
             Saving.List.Add(new StringHolder.KeyValuePair(asset.name, asset.Save()));
         }
     }
     // Create Json
     JSon = JsonUtility.ToJson(Saving);
     SaveProgress(JSon);
 }