protected override void OnDrawInfo() { var report = BuildAuditor.GetBuildReport(); if (report == null) { EditorGUILayout.LabelField("Build Report summary not found"); } else { EditorGUILayout.LabelField("Build Name: ", Path.GetFileNameWithoutExtension(report.summary.outputPath)); EditorGUILayout.LabelField("Platform: ", report.summary.platform.ToString()); EditorGUILayout.LabelField("Started at: ", report.summary.buildStartedAt.ToString()); EditorGUILayout.LabelField("Ended at: ", report.summary.buildEndedAt.ToString()); EditorGUILayout.LabelField("Total Time: ", Formatting.FormatTime(report.summary.totalTime)); EditorGUILayout.LabelField("Total Size: ", Formatting.FormatSize(report.summary.totalSize)); EditorGUILayout.LabelField("Build Result: ", report.summary.result.ToString()); } }
protected override void OnDrawInfo() { var report = BuildAuditor.GetBuildReport(); if (report == null) { EditorGUILayout.LabelField("Build Report not found"); } else { EditorGUILayout.LabelField("Build Name: ", Application.productName); EditorGUILayout.LabelField("Platform: ", report.summary.platform.ToString()); EditorGUILayout.LabelField("Started at: ", report.summary.buildStartedAt.ToString()); EditorGUILayout.LabelField("Ended at: ", report.summary.buildEndedAt.ToString()); EditorGUILayout.LabelField("Total Time: ", Formatting.FormatTime(report.summary.totalTime)); EditorGUILayout.LabelField("Total Size: ", Formatting.FormatSize(report.summary.totalSize)); EditorGUILayout.LabelField("Build Result: ", report.summary.result.ToString()); } }
protected override void OnDrawInfo() { var report = BuildAuditor.GetBuildReport(); if (report == null) { EditorGUILayout.LabelField("Build Report summary not found"); } else { if (m_Desc.category == IssueCategory.BuildSteps) { EditorGUILayout.BeginVertical(); EditorGUILayout.LabelField("Build Name: ", Path.GetFileNameWithoutExtension(report.summary.outputPath)); EditorGUILayout.LabelField("Platform: ", report.summary.platform.ToString()); EditorGUILayout.LabelField("Build Result: ", report.summary.result.ToString()); EditorGUILayout.LabelField("Started at: ", report.summary.buildStartedAt.ToString()); EditorGUILayout.LabelField("Ended at: ", report.summary.buildEndedAt.ToString()); EditorGUILayout.LabelField("Total Time: ", Formatting.FormatTime(report.summary.totalTime)); EditorGUILayout.EndVertical(); } else { var width = 180; EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Size of Build", GUILayout.Width(width)); EditorGUILayout.LabelField(Formatting.FormatSize(report.summary.totalSize)); EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); var dataSize = m_GroupStats.Sum(g => g.size); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Size of Data (Uncompressed)", GUILayout.Width(width)); EditorGUILayout.LabelField(Formatting.FormatSize((ulong)dataSize)); EditorGUILayout.EndHorizontal(); EditorGUILayout.LabelField("Size By Asset Group", EditorStyles.boldLabel); EditorGUI.indentLevel++; EditorGUILayout.BeginVertical(); var barColor = new Color(0.0f, 0.6f, 0.6f); var maxGroupSize = (float)m_GroupStats.Max(g => g.size); foreach (var group in m_GroupStats) { var groupSize = group.size; EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(string.Format("{0}:", group.assetGroup), GUILayout.Width(200)); var rect = EditorGUILayout.GetControlRect(GUILayout.Width(width)); if (m_2D.DrawStart(rect)) { m_2D.DrawFilledBox(0, 1, Math.Max(1, rect.width * groupSize / maxGroupSize), rect.height - 1, barColor); m_2D.DrawEnd(); } EditorGUILayout.LabelField(string.Format("{0} / {1:0.0}%", Formatting.FormatSize((ulong)group.size), 100 * groupSize / (float)dataSize)); EditorGUILayout.Space(); EditorGUILayout.EndHorizontal(); } EditorGUILayout.EndVertical(); EditorGUI.indentLevel--; } } }