Can I set viewport resolution 2520 X 1080(21:9) ??

Instead of running a console command, try to creating a DefaultGameUserSettings.ini in the Root/Config folder and add:

[/Script/Engine.GameUserSettings]
ResolutionSizeX=2520
ResolutionSizeY=1080
FullscreenMode=2
Version=5

I tried it in a blank project and it works:

  • FullscreenMode=2 is used if you want to start your game in windowed mode (0 = Fullscreen, 1 = Windowed Fullscreen, 2 = Windowed)
  • Version=5 is mandatory (I think it’s used to override the default settings, as far as I understood from the Documentation)

If it doesn’t work you could try this C++ function:
GSystemResolution.RequestResolutionChange(int InResX, int InResY, bool bInFullScreen)

If you want to preview that resolution in a lower resolution monitor, you’ll have to use “play in new editor window” mode, and set a custom resolution in Editor preferences: (this is your aspect ratio scaled to a FHD monitor, dividing both resolutions by 1.3125, obtained dividing 2520 by 1920)

To see the actual resolution of your monitor you’ll have to run a command to scale the screen percentage, in your case:

r.ScreenPercentage 131.25

4 Likes