public override void DrawDetailsView(Rect position) { if (m_TimelineGUI != null && m_ViewType == ProfilerViewType.Timeline) { if (Event.current.isKey) { ProfilerWindowAnalytics.RecordViewKeyboardEvent(ProfilerWindowAnalytics.profilerCPUModuleTimeline); } if (Event.current.isMouse && position.Contains(Event.current.mousePosition)) { ProfilerWindowAnalytics.RecordViewMouseEvent(ProfilerWindowAnalytics.profilerCPUModuleTimeline); } CurrentFrameIndex = (int)ProfilerWindow.selectedFrameIndex; m_TimelineGUI.DoGUI(CurrentFrameIndex, position, fetchData, ref updateViewLive); } else { if (Event.current.isKey) { ProfilerWindowAnalytics.RecordViewKeyboardEvent(ProfilerWindowAnalytics.profilerCPUModuleHierarchy); } if (Event.current.isMouse && position.Contains(Event.current.mousePosition)) { ProfilerWindowAnalytics.RecordViewMouseEvent(ProfilerWindowAnalytics.profilerCPUModuleHierarchy); } base.DrawDetailsView(position); } }
void DrawSearchBar() { var rect = GUILayoutUtility.GetRect(50f, 300f, EditorGUI.kSingleLineHeight, EditorGUI.kSingleLineHeight, EditorStyles.toolbarSearchField); if (Event.current.isMouse && Event.current.button == 0 && rect.Contains(Event.current.mousePosition)) { ProfilerWindowAnalytics.SwitchActiveView(ProfilerWindowAnalytics.profilerCPUModuleSearch); } treeView.searchString = m_SearchField.OnToolbarGUI(rect, treeView.searchString); }