Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to Auto Detect a PC's Graphics Settings?

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.

Product Version: UE 4.16
more ▼

asked Jul 12 '17 at 09:13 PM in Blueprint Scripting

avatar image

28 4 7 11

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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++)

alt text alt text alt text alt text

blueprintcap.png (35.0 kB)
blueprintcap.png (9.9 kB)
blueprintcap.png (11.4 kB)
blueprintcap.png (38.5 kB)
more ▼

answered Jul 12 '17 at 09:56 PM

avatar image

ENiari Games
66 4 8 12

avatar image ENiari Games Jul 13 '17 at 05:04 PM

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.

avatar image JJGG117 Jul 24 '17 at 01:24 AM

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

Is that the GetDefaultResolution node?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question