public static void CreateReport(string directory_path) { List <EAssetFileInfo> assetFiles = new List <EAssetFileInfo>(AssetBundleAnalyzeManager.FindAssetFiles().Values); assetFiles.Sort(SortAsset); StringBuilder sb = new StringBuilder(); sb.AppendLine(string.Format("{0},{1}", "动作名称", "占用内存")); int length = assetFiles.Count; for (int i = 0; i < length; i++) { EAssetFileInfo assetFileInfo = assetFiles[i]; if (assetFileInfo._assetType != E_AssetType.ANIMATION_CLIP) { continue; } List <KeyValuePair <string, System.Object> > values = assetFileInfo._propertys; sb.Append(string.Format("{0},{1}", assetFileInfo._assetName, values[0].Value)); int refCount = assetFileInfo._includedBundles.Count; for (int j = 0; j < refCount; j++) { sb.Append("," + assetFileInfo._includedBundles[j].AbName); } sb.AppendLine(); } FileHelper.WriteTxtByFile(directory_path + "/" + ANIMATIONCLIP_NAME, sb.ToString()); }
public static void CreateReport(string directory_path) { List <EAssetFileInfo> asset_files = new List <EAssetFileInfo>(AssetBundleAnalyzeManager.FindAssetFiles().Values); asset_files.Sort(SortAsset); StringBuilder sb = new StringBuilder(); sb.AppendLine(string.Format("{0},{1},{5},{2},{3},{4}", asset_name, asset_size, asset_type, be_ref_count, ab_list, in_built)); int length = asset_files.Count; for (int i = 0; i < length; i++) { EAssetFileInfo info = asset_files[i]; sb.Append(info._assetName + "," + info.GetMemorySize() + "," + info._inBuilt + "," + info._assetType + "," + info._includedBundles.Count); int ref_count = info._includedBundles.Count; for (int j = 0; j < ref_count; j++) { EAssetBundleFileInfo assetbundle_file = info._includedBundles[j]; sb.Append("," + assetbundle_file.AbName); } sb.AppendLine(); } FileHelper.WriteTxtByFile(directory_path + "/" + ASSET_REPORT_NAME, sb.ToString()); }
public static void CreateReport(string directoryPath) { List <EAssetFileInfo> assetFiles = new List <EAssetFileInfo>(AssetBundleAnalyzeManager.FindAssetFiles().Values); assetFiles.Sort(SortAsset); StringBuilder sb = new StringBuilder(); sb.AppendLine(string.Format("{0},{1},{2},{3}," + "{4},{5},{6}," + "{7},{8},{9}", TEXTURE_NAME, TEXTURE_GUI, WIDTH, HEIGHT, FORMAT, MIP_MAP, READ_WRITE, SIZE, AB_COUNT, AB_FILES)); int length = assetFiles.Count; for (int i = 0; i < length; i++) { EAssetFileInfo assetFileInfo = assetFiles[i]; if (assetFileInfo._assetType != E_AssetType.TEXTURE) { continue; } List <KeyValuePair <string, Object> > values = assetFileInfo._propertys; long memSize = (long)values[5].Value; sb.Append(string.Format("{0},{1},{2}," + "{3},{4},{5}," + "{6},{7},{8}", assetFileInfo._assetName, assetFileInfo._guid, values[0].Value, values[1].Value, values[2].Value, values[3].Value, values[4].Value, memSize, assetFileInfo._includedBundles.Count)); int refCount = assetFileInfo._includedBundles.Count; for (int j = 0; j < refCount; j++) { sb.Append("," + assetFileInfo._includedBundles[j].AbName); } sb.AppendLine(); } FileHelper.WriteTxtByFile(directoryPath + "/" + REPORT_NAME, sb.ToString()); }
public static void CreateReport(string directoryPath) { List <EAssetFileInfo> assetFiles = new List <EAssetFileInfo>(AssetBundleAnalyzeManager.FindAssetFiles().Values); assetFiles.Sort(SortAsset); StringBuilder sb = new StringBuilder(); sb.AppendLine(string.Format("{0},{1},{2}," + "{3},{4},{5}", "网格名字", "顶点数", "面数", "子网格数", "网格压缩", "Read/Write")); int length = assetFiles.Count; for (int i = 0; i < length; i++) { EAssetFileInfo assetFileInfo = assetFiles[i]; if (assetFileInfo._assetType != E_AssetType.MESH) { continue; } List <KeyValuePair <string, Object> > values = assetFileInfo._propertys; sb.Append(string.Format("{0},{1},{2}," + "{3},{4},{5}", assetFileInfo._assetName, values[0].Value, values[1].Value, values[2].Value, values[3].Value, values[4].Value)); int refCount = assetFileInfo._includedBundles.Count; for (int j = 0; j < refCount; j++) { sb.Append("," + assetFileInfo._includedBundles[j].AbName); } sb.AppendLine(); } FileHelper.WriteTxtByFile(directoryPath + "/" + MESH_NAME, sb.ToString()); }
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()); }
public static void CreateReportAssetBundle() { AssetBundleAnalyzeManager.Analyze(); }