static void SetupProfiledConnection(int connId) { ProfilerDriver.connectedProfiler = ProfilerDriver.GetAvailableProfilers().FirstOrDefault(id => id == connId); Menu.SetChecked("Edit/Record", s_SlaveProfilerWindow.IsRecording()); Menu.SetChecked("Edit/Deep Profiling", ProfilerDriver.deepProfiling); EditorApplication.UpdateMainWindowTitle(); s_SlaveProfilerWindow.Repaint(); }
static object HandleToggleRecording(string eventType, object[] args) { var isPlaying = Convert.ToBoolean(args[0]); s_SlaveProfilerWindow.Focus(); ProfilerDriver.profileEditor = !isPlaying; s_SlaveProfilerWindow.SetRecordingEnabled(!ProfilerDriver.enabled); return(s_SlaveProfilerWindow.IsRecording()); }
static void SetProfilerWindowTitle(ApplicationTitleDescriptor desc) { if (s_SlaveProfilerWindow == null) { return; } if (s_SlaveProfilerWindow.IsRecording()) { var playStateHint = !ProfilerDriver.profileEditor ? "PLAY" : "EDIT"; desc.title = $"Profiler [RECORDING {playStateHint}] - {desc.projectName} - {desc.unityVersion}"; } else { desc.title = $"Profiler - {desc.projectName} - {desc.unityVersion}"; } }