Bug discovered in 4.16 verified as continuing to exist in 4.17 Preview. Unable to set screen to any form of windowed mode or otherwise set screen resolution dynamically during runtime.
In the several years I’ve worked with UE4 I’ve usually had the opposite problem trying to get a packaged project to enter a full screen mode.
What has been attempted in 4.16:
Execute Console Command.
Getting User Settings, setting a screen resolution, and then applying that screen resolution.
Using an .ini file setting.
Command line argument.
Only #4 worked with 4.16
So far with 4.17 only #1 and #2 have been tested. Given the definite lack of response by any staff member when I reported this in the support forum I’m given little reason to doubt that it’s been fixed in 4.17 for the other two options.
Only possible work around - Windows only (that I know of).
During execution write a bat/cmd file with the new command line arguments and some reference to where the packaged product should restart.
Prompt the user with instructions to run the batch command if they wish to continue.
Exit and hope the user is still interested in using the packaged product.
Thank Epic for returning us back to the days of DOS.
Sorry for sounding snarky but this is a major bug. No package product should be forced to either windowed or fullscreen mode. I was hoping the 4.16.3 would have had the fix but apparently no one thought it worthwhile.
If I’m doing something wrong in trying to do this basic task that has changed since 4.15 I’d dearly love to know but for now I have to either assume that it is a major bug or a new feature that hasn’t been explained or documented correctly. I’d happily track down the bug in the engine source but I don’t even know where to start with that even.
Right now I have a project that I can thankfully split into two smaller projects, each with its own engine version. I have to use 4.15 with one because of this bug introduced with 4.16+, and use 4.16+ with the other because of a bug that was only fixed in 4.16+. But this means distributing two different copies of the engine. Is this even allowed in the license?!
I’d expect #2 /#3 * to work fine and it’s what our games use. One big gotcha is that you need to call ConfirmVideoMode() when changing resolutions or fullscreen to make sure it’s recorded permanently. This dates back to the days where you could set a resolution on a CRT and see nothing if it was out of specs for the monitor, so typically games would show a ‘keep changes’ prompt with a countdown timer before they reverted back to the previous settings. If you are calling that and it’s still not working, please open an AnswerHub ticket with your code or BP logic.
*(#3 is effectively the same as #2 on subsequent runs, assuming you do SaveSettings or ApplySettings after modifying something)
Cheers,
Noland