void DrawDLLList(BuildInfo buildReportToDisplay) { BuildReportTool.BuildPlatform buildPlatform = BuildReportTool.ReportGenerator.GetBuildPlatformFromString(buildReportToDisplay.BuildType, buildReportToDisplay.BuildTargetUsed); GUILayout.BeginHorizontal(); GUILayout.BeginVertical(); GUILayout.Label(Labels.MONO_DLLS_LABEL, BuildReportTool.Window.Settings.INFO_TITLE_STYLE_NAME); { GUILayout.BeginHorizontal(GUILayout.MaxWidth(500)); DrawNames(buildReportToDisplay.MonoDLLs); DrawReadableSizes(buildReportToDisplay.MonoDLLs); GUILayout.EndHorizontal(); } GUILayout.EndVertical(); GUILayout.Space(15); GUILayout.BeginVertical(); GUILayout.Label(Labels.SCRIPT_DLLS_LABEL, BuildReportTool.Window.Settings.INFO_TITLE_STYLE_NAME); { GUILayout.BeginHorizontal(GUILayout.MaxWidth(500)); DrawNames(buildReportToDisplay.ScriptDLLs); if (buildPlatform != BuildPlatform.WebGL) { DrawReadableSizes(buildReportToDisplay.ScriptDLLs); } GUILayout.EndHorizontal(); } GUILayout.EndVertical(); GUILayout.EndHorizontal(); }
void DrawAuxiliaryBuildSizes(BuildReportTool.BuildInfo buildReportToDisplay) { BuildReportTool.BuildPlatform buildPlatform = BuildReportTool.ReportGenerator.GetBuildPlatformFromString(buildReportToDisplay.BuildType, buildReportToDisplay.BuildTargetUsed); if (buildPlatform == BuildReportTool.BuildPlatform.Web) { GUILayout.Space(20); GUILayout.BeginVertical(); GUILayout.Label(Labels.WEB_UNITY3D_FILE_SIZE_LABEL, BuildReportTool.Window.Settings.INFO_SUBTITLE_BOLD_STYLE_NAME); GUILayout.Label(buildReportToDisplay.WebFileBuildSize, BuildReportTool.Window.Settings.BIG_NUMBER_STYLE_NAME); GUILayout.EndVertical(); } else if (buildPlatform == BuildReportTool.BuildPlatform.Android) { if (!buildReportToDisplay.AndroidCreateProject && buildReportToDisplay.AndroidUseAPKExpansionFiles) { GUILayout.Space(20); GUILayout.BeginVertical(); GUILayout.Label(Labels.ANDROID_APK_FILE_SIZE_LABEL, BuildReportTool.Window.Settings.INFO_SUBTITLE_BOLD_STYLE_NAME); GUILayout.Label(buildReportToDisplay.AndroidApkFileBuildSize, BuildReportTool.Window.Settings.INFO_TITLE_STYLE_NAME); GUILayout.EndVertical(); GUILayout.Space(20); GUILayout.BeginVertical(); GUILayout.Label(Labels.ANDROID_OBB_FILE_SIZE_LABEL, BuildReportTool.Window.Settings.INFO_SUBTITLE_BOLD_STYLE_NAME); GUILayout.Label(buildReportToDisplay.AndroidObbFileBuildSize, BuildReportTool.Window.Settings.INFO_TITLE_STYLE_NAME); GUILayout.EndVertical(); } else if (buildReportToDisplay.AndroidCreateProject && buildReportToDisplay.AndroidUseAPKExpansionFiles) { GUILayout.Space(20); GUILayout.BeginVertical(); GUILayout.Label(Labels.ANDROID_OBB_FILE_SIZE_LABEL, BuildReportTool.Window.Settings.INFO_SUBTITLE_BOLD_STYLE_NAME); GUILayout.Label(buildReportToDisplay.AndroidObbFileBuildSize, BuildReportTool.Window.Settings.INFO_TITLE_STYLE_NAME); GUILayout.EndVertical(); } } // Streaming Assets if (buildReportToDisplay.HasStreamingAssets) { GUILayout.Space(20); BuildReportTool.Window.Utility.DrawLargeSizeDisplay(Labels.STREAMING_ASSETS_TOTAL_SIZE_LABEL, Labels.STREAMING_ASSETS_SIZE_DESC, buildReportToDisplay.StreamingAssetsSize); } }
void DrawDLLList(BuildReportTool.BuildInfo buildReportToDisplay) { BuildReportTool.BuildPlatform buildPlatform = BuildReportTool.ReportGenerator.GetBuildPlatformFromString(buildReportToDisplay.BuildType, buildReportToDisplay.BuildTargetUsed); GUILayout.BeginHorizontal(); // column 1 GUILayout.BeginVertical(); if (_hasMonoDLLsToDisplay) { GUILayout.Label(Labels.MONO_DLLS_LABEL, BuildReportTool.Window.Settings.INFO_TITLE_STYLE_NAME); { GUILayout.BeginHorizontal(GUILayout.MaxWidth(500)); DrawNames(buildReportToDisplay.MonoDLLs); DrawReadableSizes(buildReportToDisplay.MonoDLLs); GUILayout.EndHorizontal(); } GUILayout.Space(20); } if (_hasUnityEngineDLLsToDisplay) { DrawScriptDLLsList(buildReportToDisplay, buildPlatform); } GUILayout.EndVertical(); GUILayout.Space(15); // column 2 GUILayout.BeginVertical(); if (_hasUnityEngineDLLsToDisplay) { GUILayout.Label(Labels.UNITY_ENGINE_DLLS_LABEL, BuildReportTool.Window.Settings.INFO_TITLE_STYLE_NAME); { GUILayout.BeginHorizontal(GUILayout.MaxWidth(500)); DrawNames(buildReportToDisplay.UnityEngineDLLs); DrawReadableSizes(buildReportToDisplay.UnityEngineDLLs); GUILayout.EndHorizontal(); } } else { DrawScriptDLLsList(buildReportToDisplay, buildPlatform); } GUILayout.Space(20); GUILayout.EndVertical(); GUILayout.EndHorizontal(); }
public static string GetProperBuildSizeDesc(BuildInfo buildReportToDisplay) { BuildReportTool.BuildPlatform buildPlatform = BuildReportTool.ReportGenerator.GetBuildPlatformFromString(buildReportToDisplay.BuildType, buildReportToDisplay.BuildTargetUsed); switch (buildPlatform) { case BuildReportTool.BuildPlatform.MacOSX32: return(Labels.BUILD_SIZE_MACOSX_DESC); case BuildReportTool.BuildPlatform.MacOSX64: return(Labels.BUILD_SIZE_MACOSX_DESC); case BuildReportTool.BuildPlatform.MacOSXUniversal: return(Labels.BUILD_SIZE_MACOSX_DESC); case BuildReportTool.BuildPlatform.Windows32: return(Labels.BUILD_SIZE_WINDOWS_DESC); case BuildReportTool.BuildPlatform.Windows64: return(Labels.BUILD_SIZE_WINDOWS_DESC); case BuildReportTool.BuildPlatform.Linux32: return(Labels.BUILD_SIZE_STANDALONE_DESC); case BuildReportTool.BuildPlatform.Linux64: return(Labels.BUILD_SIZE_STANDALONE_DESC); case BuildReportTool.BuildPlatform.LinuxUniversal: return(Labels.BUILD_SIZE_LINUX_UNIVERSAL_DESC); case BuildReportTool.BuildPlatform.Android: if (buildReportToDisplay.AndroidCreateProject) { return(Labels.BUILD_SIZE_ANDROID_WITH_PROJECT_DESC); } if (buildReportToDisplay.AndroidUseAPKExpansionFiles) { return(Labels.BUILD_SIZE_ANDROID_WITH_OBB_DESC); } return(Labels.BUILD_SIZE_ANDROID_DESC); case BuildReportTool.BuildPlatform.iOS: return(Labels.BUILD_SIZE_IOS_DESC); case BuildReportTool.BuildPlatform.Web: return(Labels.BUILD_SIZE_WEB_DESC); } return(""); }
void DrawScriptDLLsList(BuildInfo buildReportToDisplay, BuildReportTool.BuildPlatform buildPlatform) { if (!_hasScriptDLLsToDisplay) { return; } GUILayout.Label(Labels.SCRIPT_DLLS_LABEL, BuildReportTool.Window.Settings.INFO_TITLE_STYLE_NAME); { GUILayout.BeginHorizontal(GUILayout.MaxWidth(500)); DrawNames(buildReportToDisplay.ScriptDLLs); DrawReadableSizes(buildReportToDisplay.ScriptDLLs); GUILayout.EndHorizontal(); } }
public static void CreateForUsedAssetsOnly(TextureData data, BuildReportTool.BuildInfo buildInfo, bool debugLog = false) { if (buildInfo == null) { if (debugLog) { Debug.LogError("Can't create TextureData for Used Assets, BuildInfo is null"); } return; } if (debugLog) { Debug.Log("Will create TextureData for Used Assets"); } BuildReportTool.BuildPlatform buildPlatform = BuildReportTool.ReportGenerator.GetBuildPlatformFromString(buildInfo.BuildType, buildInfo.BuildTargetUsed); var textureDataEntries = data.GetTextureData(); textureDataEntries.Clear(); AppendTextureData(data, buildPlatform, buildInfo.UsedAssets.All, false, debugLog); }
static void AppendTextureData(TextureData data, BuildReportTool.BuildPlatform buildPlatform, IList <SizePart> assets, bool overwriteExistingEntries, bool debugLog = false) { if (debugLog) { Debug.LogFormat("Creating Texture Data for {0} assets", assets.Count.ToString()); } var platformString = GetPlatformString(buildPlatform); var textureDataEntries = data.GetTextureData(); for (int n = 0; n < assets.Count; ++n) { if (!Util.IsTextureFile(assets[n].Name)) { // this asset is not an image, skip it continue; } if (textureDataEntries.ContainsKey(assets[n].Name)) { if (!overwriteExistingEntries) { continue; } else { var newEntry = CreateEntry(assets[n].Name, platformString, debugLog); textureDataEntries[assets[n].Name] = newEntry; } } else { var newEntry = CreateEntry(assets[n].Name, platformString, debugLog); textureDataEntries.Add(assets[n].Name, newEntry); } } }