How to Auto Detect a PC's Graphics Settings?

There are blueprints to get all of that information.
Here’s just a few to get you started:

Get Supported Fullscreen Resolutions

Get Viewport Size

Get Default Resolution

Get Convenient Windowed Resolutions

Get Fullscreen Mode

Set Fullscreen Mode | Mode Options (Fullscreen, Windowed Full Screen, Windowed)

and so forth…

Saving Resolution/s

Create two ints, X and Y and write them to a file, either using a save method or your own file io function. Sorry to be a little vague on this part, but it should be pretty straight forward once you know how to get the resolution variables. Also, remember that any return structs can be split into individual values in blueprints. So Get Resolution will return a struct that can be split so that you can grab individual values such as size X and size Y.

Where to add the “Auto Logic”

I recommend adding any logic in the level blueprint in which you will be representing the “Main Menu” for your project. What I have done in past projects is create a level in which only has a single role, to spawn a main menu user widget and add it to the viewport. Use the widget to allow the user to customize resolutions and graphic behavior, and let the level blueprint read from some file, the last set values for resolution and fullscreen settings. Just a thought, sorry to rush the answer, just hate to see you stuck.

You won’t be able to personally mess around much with the engine itself without the source. (Which is C++)


191995-blueprintcap.png

191996-blueprintcap.png

191997-blueprintcap.png

191998-blueprintcap.png

Well, a few ways I can think of off the top of my head is store the variables in the game’s .ini config file, or saving the values to a .txt file in the projects file and reading / writing to it from blueprints.
Here one plugin I found for file writing from Blueprints.

If you’re just trying to save during the instance of the game running, then I’d recommend creating and saving the values to your gameinstance. Your OptionsMenu itself won’t remember unless you’ve saved the values somewhere you can pull from later on, after your Options widget has been reconstructed.

I’m just wondering how to collect user’s regular and suggested resolution.

Is that the GetDefaultResolution node?

On startup of a UE4 game, how does UE4 automatically recognize hardware and set the correct Graphics Settings, specifically Resolution and maybe Fullscreen?

I’d like to be able to save that and set it automatically and save it to preference.

1 Like