Beispiel #1
0
        private void ClickEnableFrameDebugger()
        {
            bool flag  = FrameDebuggerUtility.IsLocalEnabled() || FrameDebuggerUtility.IsRemoteEnabled();
            bool flag2 = !flag && this.m_AttachProfilerUI.IsEditor();

            if (!flag2 || FrameDebuggerUtility.locallySupported)
            {
                if (flag2)
                {
                    if (EditorApplication.isPlaying && !EditorApplication.isPaused)
                    {
                        EditorApplication.isPaused = true;
                    }
                }
                if (!flag)
                {
                    FrameDebuggerUtility.SetEnabled(true, ProfilerDriver.connectedProfiler);
                }
                else
                {
                    FrameDebuggerUtility.SetEnabled(false, FrameDebuggerUtility.GetRemotePlayerGUID());
                }
                if (FrameDebuggerUtility.IsLocalEnabled())
                {
                    GameView gameView = (GameView)WindowLayout.FindEditorWindowOfType(typeof(GameView));
                    if (gameView)
                    {
                        gameView.ShowTab();
                    }
                }
                this.m_PrevEventsLimit = FrameDebuggerUtility.limit;
                this.m_PrevEventsCount = FrameDebuggerUtility.count;
            }
        }
 private void ClickEnableFrameDebugger()
 {
     if (GraphicsSupportsFrameDebugger())
     {
         if ((!FrameDebuggerUtility.enabled && EditorApplication.isPlaying) && !EditorApplication.isPaused)
         {
             EditorApplication.isPaused = true;
         }
         FrameDebuggerUtility.enabled = !FrameDebuggerUtility.enabled;
         if (FrameDebuggerUtility.enabled)
         {
             GameView view = (GameView)WindowLayout.FindEditorWindowOfType(typeof(GameView));
             if (view != null)
             {
                 view.ShowTab();
             }
         }
         this.m_PrevEventsLimit = FrameDebuggerUtility.limit;
         this.m_PrevEventsCount = FrameDebuggerUtility.count;
     }
 }