Since Epic have refused to fix this for two years, and have instead marked the bug “Won’t fix”, below is a workaround to add fullscreen support to the Play In Editor / new window, using AutoHotkey.
It can also open the editor window in fullscreen by default, and automatically clicks into it to capture the mouse.
Note that you will need to have AutoHotkey installed to use this script.
Save as UE4StandaloneFullscreen.ahk and run before using the editor. Add it to system startup if necessary.
;
; Unreal Engine "Play In Editor" fullscreen mode script
; Switches the editor window to/from fullscreen mode on Alt+Enter
; Automatically puts the editor window in fullscreen mode on startup
; (can be turned off, see below)
; Also automatically clicks into the game window to capture mouse input
;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: Nameless Voice
;
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetTitleMatchMode, 2 ; Use partial title matching
; =========== Script configuration, adjust as needed ============
; Whether to automatically go full screen when entering game mode
autoFullscreen = true
; The mouse button to use to click on the window and capture the cursor
; should be one that doesn't do anything inmportant in the game
; Use a value such as L/R/M/X1/X2 for left/right//mouse4/mouse5, respectively
mouseButtonForCapture = X1
; Some parameters of the UE4 window, these might change on different versions operating systems
BorderWidth = 4
TitlebarHeight = 29
; =========== Script follows, don't edit below this point ============
isFullscreen = false
WindowID = Preview Standalone ahk_class UnrealWindow
#IfWinActive Unreal Editor ahk_class UnrealWindow
~!p::
WinWait, %WindowID%
isFullscreen := false
; Click on the screen to activate
MouseClick, %mouseButtonForCapture%, A_ScreenWidth/2, A_ScreenHeight/2
if (autoFullscreen) {
GoFullscreen()
}
return
#IfWiNActive
#IfWinActive Preview Standalone ahk_class UnrealWindow
!Enter::
if (!isFullscreen) {
GoFullscreen()
} else {
LeaveFullscreen()
}
return
#IfWiNActive
GoFullscreen()
{
global BorderWidth
global TitlebarHeight
global WindowID
global oldX, oldY, oldWidth, oldHeight
global isFullscreen
; Calculate the desired size
SysGet, screen, MonitorWorkArea
TaskbarSize := A_ScreenHeight - screenBottom
PosLeft := 0 - BorderWidth
PosRight := A_ScreenWidth + (BorderWidth * 2)
PosTop := 0 - TitlebarHeight
PosBottom := A_ScreenHeight + TaskbarSize
; Save old window position and size
WinGetPos, oldX, oldY, oldWidth, oldHeight, %WindowID%
WinSet, Top,, %WindowID%
WinGet, id, , %WindowID%
Result := DllCall("SetWindowPos", "uint", id, "uint", HWND_TOP, "Int", PosLeft, "Int", PosTop, "Int", PosRight, "Int", PosBottom, "UInt", 0x400)
isFullscreen := true
}
LeaveFullscreen()
{
global WindowID
global oldX, oldY, oldWidth, oldHeight
global isFullscreen
WinMove, %WindowID%,, %oldX%, %oldY%, %oldWidth%, %oldHeight%
isFullscreen := false
}