How to set windowed mode at screen position?

I want to set my gamewindow to windowed mode at a certain resolution and screen position with blueprints.

The Fullscreen mode and Screen Resolution are working as expected. See Blueprint below.

At the moment it is centering the window.

How to specify the location of the window? How to set it for example at the top left corner? (winx=0, winy=0)

Tried this without success:

Hello! You cant set it with GetDefaultWindowPosition because it is returning copy, not ref. One approach to use UGameUserSettings class from C++ and its method

void SetWindowPosition(int32 WindowPosX, int32 WindowPosY);

Also It looks like you can edit values in GameUserSettings.ini (check out Saved/Config folder)

How to implement the c++ approach? I already tried the GameUserSettings.ini without success, looks like the ‘WindowPosX’ is not evaluated.
I can make it work with command line arguments with a packaged game.

Do you have BP project or C++?

BP Project

I dont know if there is a better way, but you can try this

  • create empty C++ proj
  • migrate all assets, levels and data from BP proj to C++ proj
  • add C++ class for UGameInstance for example and set proj to use this class (in proj settings)
  • add call to method that was mentioned above…