Exemple #1
0
 static object HandleToggleRecording(string eventType, object[] args)
 {
     s_SlaveProfilerWindow.Focus();
     s_SlaveProfilerWindow.SetRecordingEnabled(!ProfilerDriver.enabled);
     InternalEditorUtility.RepaintAllViews();
     return(s_SlaveProfilerWindow.IsRecording());
 }
Exemple #2
0
 static void SetupProfiledConnection(int connId, bool recording, bool isPlaying)
 {
     ProfilerDriver.connectedProfiler = ProfilerDriver.GetAvailableProfilers().FirstOrDefault(id => id == connId);
     ProfilerDriver.profileEditor     = !isPlaying;
     s_SlaveProfilerWindow.SetRecordingEnabled(recording);
     s_SlaveProfilerWindow.Repaint();
     EditorApplication.UpdateMainWindowTitle();
 }
Exemple #3
0
            static object HandleSyncMasterPlayPause(string eventType, object[] args)
            {
                var isPlaying = Convert.ToBoolean(args[0]);
                var paused    = (PauseState)Convert.ToInt32(args[1]) == PauseState.Paused;

                if (isPlaying)
                {
                    ProfilerDriver.profileEditor = false;
                    s_SlaveProfilerWindow?.SetRecordingEnabled(!paused);
                }
                return(null);
            }
Exemple #4
0
            static void SetupProfilerWindow(ProfilerWindow profilerWindow)
            {
                profilerWindow.SetRecordingEnabled(false);
                profilerWindow.currentFrameChanged        -= OnProfilerCurrentFrameChanged;
                profilerWindow.recordingStateChanged      -= OnProfilerWindowRecordingStateChanged;
                profilerWindow.deepProfileChanged         -= OnProfilerWindowDeepProfileChanged;
                profilerWindow.memoryRecordingModeChanged -= OnProfilerWindowMemoryRecordModeChanged;

                profilerWindow.currentFrameChanged        += OnProfilerCurrentFrameChanged;
                profilerWindow.recordingStateChanged      += OnProfilerWindowRecordingStateChanged;
                profilerWindow.deepProfileChanged         += OnProfilerWindowDeepProfileChanged;
                profilerWindow.memoryRecordingModeChanged += OnProfilerWindowMemoryRecordModeChanged;
            }