public override void OnEnable(IProfilerWindowController profilerWindow) { base.OnEnable(profilerWindow); m_TimelineGUI = new ProfilerTimelineGUI(m_ProfilerWindow); m_TimelineGUI.OnEnable(this, false); m_TimelineGUI.viewTypeChanged += CPUOrGPUViewTypeChanged; }
internal override void OnEnable() { base.OnEnable(); m_TimelineGUI = new ProfilerTimelineGUI(); m_TimelineGUI.OnEnable(this, ProfilerWindow, false); // safety guarding against event registration leaks due to an imbalance of OnEnable/OnDisable Calls, by deregistering first m_TimelineGUI.viewTypeChanged -= CPUOrGPUViewTypeChanged; m_TimelineGUI.viewTypeChanged += CPUOrGPUViewTypeChanged; m_TimelineGUI.selectionChanged -= SetSelectionWithoutIntegrityChecksOnSelectionChangeInDetailedView; m_TimelineGUI.selectionChanged += SetSelectionWithoutIntegrityChecksOnSelectionChangeInDetailedView; UpdateSelectionHighlightLabel(); }