static void SetupProfiledConnection(int connId) { ProfilerDriver.connectedProfiler = ProfilerDriver.GetAvailableProfilers().FirstOrDefault(id => id == connId); ModeService.RefreshMenus(); Menu.SetChecked("Edit/Record", s_SlaveProfilerWindow.IsRecording()); Menu.SetChecked("Edit/Deep Profiling", ProfilerDriver.deepProfiling); EditorApplication.UpdateMainWindowTitle(); s_SlaveProfilerWindow.Repaint(); }
static void SetupProfilerDriver() { EditorApplication.update -= SetupProfilerDriver; if (s_ProfilerDriverSetup) return; ProfilerDriver.profileEditor = ProfilerUserSettings.defaultTargetMode == ProfilerEditorTargetMode.Editmode; var playerConnectionInfo = new PlayerConnectionInfo { recording = ProfilerDriver.enabled, profileEditor = ProfilerDriver.profileEditor }; if (!SessionState.GetBool("OOPP.PlayerConnectionOpened", false)) EventService.Request(nameof(EventType.UmpProfilerOpenPlayerConnection), HandlePlayerConnectionOpened, playerConnectionInfo, 5000L); s_ProfilerDriverSetup = true; ModeService.RefreshMenus(); }