Example #1
0
 private void LoadFromString()
 {
     if (rootList == null)
     {
         rootList = new List <VirtualFolderInfo>();
     }
     rootList.Clear();
     foreach (var listInfo in allInfos)
     {
         rootList.Add(VirtualFolderUtility.ListToTree(listInfo.infos));
     }
 }
Example #2
0
 public string SaveToString()
 {
     if (allInfos == null)
     {
         allInfos = new List <VirtualFolderSubList>();
     }
     allInfos.Clear();
     foreach (var info in rootList)
     {
         List <VirtualFolderInfo> infoList = new List <VirtualFolderInfo>();
         VirtualFolderUtility.UpdateDepthValues(info);
         VirtualFolderUtility.TreeToList(info, infoList);
         allInfos.Add(new VirtualFolderSubList(infoList));
     }
     return(JsonUtility.ToJson(this));
 }