Switch between fullscreen and windowed modes in packaged game

Hi all,

When I was using UE 4.17 I used to define the fullscreen mode in the DefaultGameUserSettings.ini in the Config folder of my packaged project. Today I am using 4.21 and changing the “Fullscreenmode” field in this file does not seem to have any effect anymore, do you know how we must do to change the fullscreen settings in a packaged project ? I also tried in my Level Blueprint to use the nodes “GameUserSettings” → “SetFullScreenMode(Windowed)” → “Apply Settings” but my project keeps running in fullscreen mode.

Thanks for your help,

Flora

Try this.

You could try console commands like:

for windowed mode use: r.setRes [width]x[height]w

for fullscreen mode use: r.setRes [width]x[height]f

Hi FinalZer0,

Thanks for your answer, I did not think of that and it worked. However I am looking for a permanent solution, so that everytime I run the game it starts in windowed or in fullscreen mode depending on what I choose

Cheers,

Flora

You can use “Execute console command” node
.See here: http://api.unrealengine.com/INT/BlueprintAPI/Development/ExecuteConsoleCommand/

You can use it in GameInstance init method

If you have seperate launcher in your game, then add “-ResX=1980 -ResY=1080 -WinX=0 -WinY=0” to command line that you are using for running your game

Oh, didn’t think of that either ! It should do the trick !

Thank you :slight_smile:

It worked too. I was missing the SaveSettings node… Thank you for your answer !