private void StartTrackerProfiling(Button btn, string trackerId, bool deepProfile, bool editorProfile) { if (!ProfilerHelpers.StartProfilerRecording(trackerId, editorProfile, deepProfile)) { return; } m_CurrentProfileTag = trackerId; UpdateActionButton(btn, trackerId); }
private static WindowAction StartProfilerRecordingEditorAction() { var action = WindowAction.CreateWindowMenuItem("StartProfilerRecordingEditor", (window, _action) => { // We need to fix this!! See var marker = PerformanceTrackerMonitoringService.GetWindowPaintMarker(window); ProfilerHelpers.OpenProfiler(marker, profilerWindow => { ProfilerHelpers.SetRecordingEnabled(profilerWindow, true); ProfilerHelpers.StartProfilerRecording("", true, ProfilerDriver.deepProfiling); }); }, "Window Performance/Start Profiler Recording"); return(action); }