internal static EditorWindow TryFocusAppropriateWindow(bool enteringPlaymode) { EditorWindow result; if (enteringPlaymode) { GameView gameView = (GameView)WindowLayout.FindEditorWindowOfType(typeof(GameView)); if (gameView) { WindowLayout.SaveCurrentFocusedWindowInSameDock(gameView); gameView.Focus(); } result = gameView; } else { EditorWindow editorWindow = WindowLayout.TryGetLastFocusedWindowInSameDock(); if (editorWindow) { editorWindow.ShowTab(); } result = editorWindow; } return(result); }
static internal EditorWindow TryFocusAppropriateWindow(bool enteringPlaymode) { if (enteringPlaymode) { GameView gameView = (GameView)FindEditorWindowOfType(typeof(GameView)); if (gameView) { SaveCurrentFocusedWindowInSameDock(gameView); gameView.Focus(); } return(gameView); } else { // If we can retrieve what window type was active when we went into play mode, // go back to focus a window of that type. EditorWindow window = TryGetLastFocusedWindowInSameDock(); if (window) { window.ShowTab(); } return(window); } }
internal static EditorWindow TryFocusAppropriateWindow(bool enteringPlaymode) { if (enteringPlaymode) { GameView windowToBeFocused = (GameView) FindEditorWindowOfType(typeof(GameView)); if (windowToBeFocused != null) { SaveCurrentFocusedWindowInSameDock(windowToBeFocused); windowToBeFocused.Focus(); } return windowToBeFocused; } EditorWindow window2 = TryGetLastFocusedWindowInSameDock(); if (window2 != null) { window2.ShowTab(); } return window2; }
internal static EditorWindow TryFocusAppropriateWindow(bool enteringPlaymode) { if (enteringPlaymode) { GameView editorWindowOfType = (GameView)WindowLayout.FindEditorWindowOfType(typeof(GameView)); if ((bool)((UnityEngine.Object)editorWindowOfType)) { WindowLayout.SaveCurrentFocusedWindowInSameDock((EditorWindow)editorWindowOfType); editorWindowOfType.Focus(); } return((EditorWindow)editorWindowOfType); } EditorWindow windowInSameDock = WindowLayout.TryGetLastFocusedWindowInSameDock(); if ((bool)((UnityEngine.Object)windowInSameDock)) { windowInSameDock.ShowTab(); } return(windowInSameDock); }