public static void CreateReport(string directoryPath) { List <EAssetBundleFileInfo> assetbundleFiles = AssetBundleAnalyzeManager.FindAssetBundleFiles(); assetbundleFiles.Sort(SortAsset); StringBuilder sb = new StringBuilder(); sb.AppendLine(string.Format("{0},{1},{2},{12}," + "{3},{4},{5}," + "{6},{7},{8}," + "{9},{10},{11}", ASSETBUNDLE_NAME, AB_MEMORY_SIZE, CAL_MEMORY_SIZE, AB_DEP, BE_REF, MESH, MATERIAL, TEXTURE, SHADER, SPRITE, ANIMATION_CLIP, AUDIO_CLIP, REPEAT_MEMORY_SIZE)); int length = assetbundleFiles.Count; for (int i = 0; i < length; i++) { EAssetBundleFileInfo info = assetbundleFiles[i]; int tRepeatMemSize = (int)info.GetRepeatMemSize(); int tAbSize = (int)info.FileAbMemorySize; int tAbMemSize = (int)(info.GetMemorySize()); sb.AppendLine(string.Format("{0},{1},{2},{12}," + "{3},{4},{5}," + "{6},{7},{8}," + "{9},{10},{11}", info.AbName, tAbSize, tAbMemSize, info._allDepends.Count, info.FindRedundance(), info.GetAssetCount(E_AssetType.MESH), info.GetAssetCount(E_AssetType.MATERIAL), info.GetAssetCount(E_AssetType.TEXTURE), info.GetAssetCount(E_AssetType.SHADER), info.GetAssetCount(E_AssetType.SPRITE), info.GetAssetCount(E_AssetType.ANIMATION_CLIP), info.GetAssetCount(E_AssetType.AUDIO_CLIP), tRepeatMemSize)); } FileHelper.WriteTxtByFile(directoryPath + "/" + ASSETBUNDLE_REPORT_NAME, sb.ToString()); }
public static void CreateReport(string directoryPath) { List <EAssetBundleFileInfo> assetbundle_files = AssetBundleAnalyzeManager.FindAssetBundleFiles(); assetbundle_files.Sort(SortAsset); StringBuilder sb = new StringBuilder(); sb.AppendLine(_assetbundleName); int length = assetbundle_files.Count; for (int i = 0; i < length; i++) { sb.AppendLine(assetbundle_files[i].AbName); AppendLine(sb, assetbundle_files[i]); AppendLineRedundance(sb, assetbundle_files[i]); sb.AppendLine(); } FileHelper.WriteTxtByFile(directoryPath + "/" + ASSETBUNDLEDEP_REPORT_NAME, sb.ToString()); }