internal static void LoadExcelDataFromResolveInfo(MainGameListData data) { ExcelData excelData = (ExcelData)ScriptableObject.CreateInstance(typeof(ExcelData)); excelData.list = data.Entries.Select(x => new ExcelData.Param() { list = x }).ToList(); if (!ExternalExcelData.ContainsKey(data.AssetBundleName)) { ExternalExcelData[data.AssetBundleName] = new Dictionary <string, ExcelData>(); } ExternalExcelData[data.AssetBundleName][data.FileName] = excelData; }
// internal main game furniture data /// <summary> /// Currently only resolving /// </summary> /// <param name="stream"></param> /// <param name="fileName"></param> /// <param name="guid"></param> /// <returns></returns> internal static MainGameListData LoadMainGameCSV(Stream stream, string fileName, string assetBundleName, string guid) { MainGameListData data = new MainGameListData(fileName, assetBundleName); using (StreamReader reader = new StreamReader(stream, Encoding.UTF8)) { List <string> Header = reader.ReadLine().Trim().Split(',').ToList(); data.Headers.Add(Header); while (!reader.EndOfStream) { string line = reader.ReadLine().Trim(); if (!line.Contains(',')) { break; } data.Entries.Add(line.Split(',').ToList()); } } return(data); }