Is there a keyboard shortcut to maximize the Game window in Unity in Play Mode?

I think you are able to maximize the windows if it's docked, for floating Windows it shall not work. but you can try (Shift + Space) or Alt + Enter.

Hope it helps you and have a nice day.


You can implement it yourself.

    void Update()
    {
#if UNITY_EDITOR
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            UnityEditor.EditorWindow.focusedWindow.maximized = !UnityEditor.EditorWindow.focusedWindow.maximized;
        }   
#endif
    }

Created a script to do the job that doesn't need to be attached to a gameobject:

using UnityEditor;
using UnityEngine;

[InitializeOnLoad]
static class FullscreenShortcut
{
    static FullscreenShortcut()
    {
        EditorApplication.update += Update;
    }

    static void Update()
    {
#if UNITY_EDITOR
        if (EditorApplication.isPlaying && ShouldToggleMaximize())
        {
            EditorWindow.focusedWindow.maximized = !EditorWindow.focusedWindow.maximized;
        }
#endif
    }

    private static bool ShouldToggleMaximize()
    {
        return Input.GetKey(KeyCode.Space) && Input.GetKey(KeyCode.LeftShift);
    }
}

Tags:

C#

Unity3D