예제 #1
0
        static internal void InitPlaymodeLayout()
        {
            m_PreviewWindow = WindowLayout.ShowAppropriateViewOnEnterExitPlaymode(true) as PreviewEditorWindow;
            if (m_PreviewWindow == null)
            {
                return;
            }

            if (m_PreviewWindow.maximizeOnPlay)
            {
                DockArea da = m_PreviewWindow.m_Parent as DockArea;

                if (da != null)
                {
                    m_MaximizePending = WindowLayout.MaximizePrepare(da.actualView);
                }
            }

            // Mark this preview window as the start preview so the backend
            // can set size and mouseoffset properly for this preview
            m_PreviewWindow.m_Parent.SetAsStartView();
            m_PreviewWindow.m_Parent.SetAsLastPlayModeView();

            Toolbar.RepaintToolbar();
        }
        static internal void InitPlaymodeLayout()
        {
            m_PlayModeView = WindowLayout.ShowAppropriateViewOnEnterExitPlaymode(true) as PlayModeView;
            if (m_PlayModeView == null)
            {
                return;
            }

            DockArea da = m_PlayModeView.m_Parent as DockArea;

            if (da != null)
            {
                if (m_PlayModeView.maximizeOnPlay)
                {
                    m_MaximizePending = WindowLayout.MaximizePrepare(da.actualView);
                }

                var gv = da.actualView as GameView;
                if (gv != null)
                {
                    m_PlayModeView.m_Parent.EnableVSync(gv.vSyncEnabled);
                }
            }

            // Mark this PlayModeView window as the start view so the backend
            // can set size and mouseoffset properly for this view
            m_PlayModeView.m_Parent.SetAsStartView();
            m_PlayModeView.m_Parent.SetAsLastPlayModeView();

            Toolbar.RepaintToolbar();
        }
예제 #3
0
 internal static void InitPlaymodeLayout()
 {
     m_GameView = WindowLayout.ShowAppropriateViewOnEnterExitPlaymode(true) as GameView;
     if (m_GameView != null)
     {
         if (m_GameView.maximizeOnPlay)
         {
             DockArea parent = m_GameView.m_Parent as DockArea;
             if ((parent != null) && !parent.actualView.m_Parent.window.maximized)
             {
                 m_MaximizePending = WindowLayout.MaximizePrepare(parent.actualView);
             }
         }
         m_GameView.m_Parent.SetAsStartView();
         Toolbar.RepaintToolbar();
     }
 }
예제 #4
0
 internal static void InitPlaymodeLayout()
 {
     EditorApplicationLayout.m_GameView = (WindowLayout.ShowAppropriateViewOnEnterExitPlaymode(true) as GameView);
     if (!(EditorApplicationLayout.m_GameView == null))
     {
         if (EditorApplicationLayout.m_GameView.maximizeOnPlay)
         {
             DockArea dockArea = EditorApplicationLayout.m_GameView.m_Parent as DockArea;
             if (dockArea != null)
             {
                 EditorApplicationLayout.m_MaximizePending = WindowLayout.MaximizePrepare(dockArea.actualView);
             }
         }
         EditorApplicationLayout.m_GameView.m_Parent.SetAsStartView();
         Toolbar.RepaintToolbar();
     }
 }
예제 #5
0
 internal static void InitPlaymodeLayout()
 {
     EditorApplicationLayout.m_GameView = WindowLayout.ShowAppropriateViewOnEnterExitPlaymode(true) as GameView;
     if ((Object)EditorApplicationLayout.m_GameView == (Object)null)
     {
         return;
     }
     if (EditorApplicationLayout.m_GameView.maximizeOnPlay)
     {
         DockArea parent = EditorApplicationLayout.m_GameView.m_Parent as DockArea;
         if ((Object)parent != (Object)null && !parent.actualView.m_Parent.window.maximized)
         {
             EditorApplicationLayout.m_RootSplit = WindowLayout.MaximizePrepare(parent.actualView);
         }
     }
     EditorApplicationLayout.m_GameView.m_Parent.SetAsStartView();
     Toolbar.RepaintToolbar();
 }
예제 #6
0
 internal static void InitPlaymodeLayout()
 {
     EditorApplicationLayout.m_GameView = (WindowLayout.ShowAppropriateViewOnEnterExitPlaymode(true) as GameView);
     if (EditorApplicationLayout.m_GameView == null)
     {
         return;
     }
     if (EditorApplicationLayout.m_GameView.maximizeOnPlay)
     {
         DockArea dockArea = EditorApplicationLayout.m_GameView.m_Parent as DockArea;
         if (dockArea != null)
         {
             ContainerWindow window = dockArea.actualView.m_Parent.window;
             if (!window.maximized)
             {
                 EditorApplicationLayout.m_RootSplit = WindowLayout.MaximizePrepare(dockArea.actualView);
             }
         }
     }
     EditorApplicationLayout.m_GameView.m_Parent.SetAsStartView();
     Toolbar.RepaintToolbar();
 }
        static internal void SetStopmodeLayout()
        {
            if (m_PlayModeViewList != null && m_PlayModeViewList.Count > 0)
            {
                var monitorNames = EditorFullscreenController.GetConnectedDisplayNames();
                foreach (var playModeView in m_PlayModeViewList)
                {
                    if (playModeView.fullscreenMonitorIdx >= monitorNames.Length)
                    {
                        continue;
                    }

                    EditorFullscreenController.SetSettingsForCurrentDisplay(playModeView.fullscreenMonitorIdx);
                    EditorFullscreenController.OnExitPlaymode();
                }

                m_PlayModeViewList.Clear();
                m_PlayModeViewList = null;
            }

            WindowLayout.ShowAppropriateViewOnEnterExitPlaymode(false);
            Toolbar.RepaintToolbar();
        }
예제 #8
0
 static internal void SetStopmodeLayout()
 {
     WindowLayout.ShowAppropriateViewOnEnterExitPlaymode(false);
     Toolbar.RepaintToolbar();
 }