private static void Main() { string cb2 = "Z:\\YuanShen_Data\\StreamingAssets\\AssetBundles"; string dev12 = "D:\\Works\\GenshinDev\\GenshinImpact_Data\\StreamingAssets\\AssetBundles"; string dev15 = "D:\\Works\\GenshinDevelopment\\GenshinImpact_Data\\StreamingAssets\\AssetBundles"; YSExport.Extract(dev15); }
// Token: 0x06000758 RID: 1880 RVA: 0x0003045C File Offset: 0x0002E65C public static void Extract(string folderPath) { YSExport.Reset(); YSExport._folderPath = folderPath; FileUtils.FindFile(folderPath, "*.*", delegate(FileInfo f) { string fullName = f.FullName; string text = Path.GetExtension(fullName).ToLower(); if (fullName.Contains("asset_index")) { YSExport._blkInfo = YSAssetIndex.Read(fullName); return; } if (text.Equals(".blk")) { YSExport._unityList.Add(fullName); } }); Console.WriteLine("Start Unpacking"); if (YSExport._blkInfo.Count == 0) { Console.WriteLine("Error->The asset_index file was not found, please make sure that the asset_index and blocks folders are in the same directory"); Console.WriteLine("Unpacking Failure"); } else { foreach (string filePath in YSExport._unityList) { byte[] data = FileUtils.ReadAllBytes(filePath); TaskAwaiter <bool> taskAwaiter = YSExport.ExportUnityAsset(filePath, data).GetAwaiter(); if (!taskAwaiter.IsCompleted) { TaskAwaiter <bool> taskAwaiter2; taskAwaiter2 = taskAwaiter; taskAwaiter2 = default(TaskAwaiter <bool>); } if (taskAwaiter.GetResult()) { Console.WriteLine(string.Format("Export->Success {0} Files Failure {1} Files {2}", ExportInfo.SuccessCount, ExportInfo.ErrorCount, Path.GetFileName(filePath))); } } List <string> .Enumerator enumerator = default(List <string> .Enumerator); Console.WriteLine(string.Format("Decrypt->Success {0} Files Failure {1} Files\n", ExportInfo.SuccessCount, ExportInfo.ErrorCount)); // await Task.Delay(500); Console.WriteLine("Export Path->" + Path.Combine(YSExport._folderPath, "blocks_export")); Console.WriteLine("Decryption completed, please use AssetStudio to extract resources"); } }