Move the Game Window to the center of the screen?

I have an option button to make my game toggle between fullscreen and windowed mode. But the game goes into windowed mode the game window appears in the top-left corner of the screen without the title bar at the top. However, resizing the game window then makes the title bar appear, but that’s a separate issue altogether.

My question though is: is there a console command or blueprint node that can move the game window to a specific position on the screen and/or to the center of the screen?

Here are the nodes I am currently using to get the game into windowed mode:


Here is my desktop when it goes to windowed mode:

Here is my desktop after resizing the window to any other size, thus making the title bar appear:

This is a bug. And it has been since resolved in 4.14. Though the bug is showing for converting packaged game etc, but it happens at runtime as well. Tested in 4.12

Good to know that was resolved, but my main question is:

Is there a way to move the game window? Either by “Execute Console Command” or something else?

Maybe this ? (C++)

TSharedPtr<SWindow> Window(GEngine->GameViewport->GetWindow());
if (!Window.IsValid())
{
	return;
}
		
Window->MoveWindowTo(POS);

ue4.27.2 and not fixed yet…

if any one still has this issue in 2024, I also had this issue and this solved it; go to Editor Preferences>Level Editor>Play>Game Viewport Settings>New Window Position> check the “Always center first viewport window to screen”

or you can just search for ‘window’ and look for the “Always center first viewport window to screen” and check it