private void BuildColumns() { ProfilerColumn[] array = new ProfilerColumn[] { ProfilerColumn.FunctionName, ProfilerColumn.TotalPercent, ProfilerColumn.SelfPercent, ProfilerColumn.Calls, ProfilerColumn.GCMemory, ProfilerColumn.TotalTime, ProfilerColumn.SelfTime, ProfilerColumn.WarningCount }; ProfilerColumn[] array2 = new ProfilerColumn[] { ProfilerColumn.ObjectName, ProfilerColumn.TotalPercent, ProfilerColumn.SelfPercent, ProfilerColumn.Calls, ProfilerColumn.GCMemory, ProfilerColumn.TotalTime, ProfilerColumn.SelfTime }; this.m_CPUHierarchyGUI = new ProfilerHierarchyGUI(this, "VisibleProfilerColumnsV2", array, ProfilerWindow.ProfilerColumnNames(array), false, ProfilerColumn.TotalTime); this.m_CPUTimelineGUI = new ProfilerTimelineGUI(this); string text = EditorGUIUtility.TextContent("ProfilerColumn.DetailViewObject").text; string[] array3 = ProfilerWindow.ProfilerColumnNames(array2); array3[0] = text; this.m_CPUDetailHierarchyGUI = new ProfilerHierarchyGUI(this, "VisibleProfilerDetailColumns", array2, array3, true, ProfilerColumn.TotalTime); ProfilerColumn[] array4 = new ProfilerColumn[] { ProfilerColumn.FunctionName, ProfilerColumn.TotalGPUPercent, ProfilerColumn.DrawCalls, ProfilerColumn.TotalGPUTime }; ProfilerColumn[] array5 = new ProfilerColumn[] { ProfilerColumn.ObjectName, ProfilerColumn.TotalGPUPercent, ProfilerColumn.DrawCalls, ProfilerColumn.TotalGPUTime }; this.m_GPUHierarchyGUI = new ProfilerHierarchyGUI(this, "VisibleProfilerGPUColumns", array4, ProfilerWindow.ProfilerColumnNames(array4), false, ProfilerColumn.TotalGPUTime); array3 = ProfilerWindow.ProfilerColumnNames(array5); array3[0] = text; this.m_GPUDetailHierarchyGUI = new ProfilerHierarchyGUI(this, "VisibleProfilerGPUDetailColumns", array5, array3, true, ProfilerColumn.TotalGPUTime); }
private void DrawCPUOrRenderingPane(ProfilerHierarchyGUI mainPane, ProfilerHierarchyGUI detailPane, ProfilerTimelineGUI timelinePane) { ProfilerProperty profilerProperty = this.CreateProperty(false); this.DrawCPUOrRenderingToolbar(profilerProperty); if (!ProfilerWindow.CheckFrameData(profilerProperty)) { profilerProperty.Cleanup(); return; } if (timelinePane != null && this.m_ViewType == ProfilerViewType.Timeline) { float num = (float)this.m_VertSplit.realSizes[1]; num -= EditorStyles.toolbar.CalcHeight(GUIContent.none, 10f) + 2f; timelinePane.DoGUI(this.GetActiveVisibleFrameIndex(), base.position.width, base.position.height - num, num); profilerProperty.Cleanup(); } else { SplitterGUILayout.BeginHorizontalSplit(this.m_ViewSplit, new GUILayoutOption[0]); GUILayout.BeginVertical(new GUILayoutOption[0]); bool expandAll = false; mainPane.DoGUI(profilerProperty, this.m_SearchString, expandAll); profilerProperty.Cleanup(); GUILayout.EndVertical(); GUILayout.BeginVertical(new GUILayoutOption[0]); ProfilerProperty profilerProperty2 = this.CreateProperty(true); ProfilerProperty detailedProperty = mainPane.GetDetailedProperty(profilerProperty2); profilerProperty2.Cleanup(); if (detailedProperty != null) { detailPane.DoGUI(detailedProperty, string.Empty, expandAll); detailedProperty.Cleanup(); } else { ProfilerWindow.DrawEmptyCPUOrRenderingDetailPane(); } GUILayout.EndVertical(); SplitterGUILayout.EndHorizontalSplit(); } }