Detect user's screen resolution - possible in BP?

I hope the title is self-explanatory :slight_smile: It could be used to automatically set proper resolution via Execute Console Command, for example right after Begin Play of the first level, which could be a main menu.

bump… :slight_smile:

bump… o/

:wink:

Thx, but it gives viewport size (so it gives different values every time i resize my viewport), not screen resolution size. I guess that to get screen resolution we need to dig deeper into C++ for some system display info :frowning:

Just out of curiosity: Why? The viewport size is all that matters as you can’t work with anything else. If it’s just for the resolution menu so only possible resolutions are displayed… You will have to do some C++ work there anyway since there is currently no way to rebind keys in BP only and I assume you want to do that. But besides that I can’t really think of one.

Most of new games detects user native resolution and sets it up just after game starts - So, for example, if user has 1920x1080 screen resolution, his game will start with that resolution automatically. I’ve thought if maybe that’s possible in UE blueprints… But well, it’s not that important, we can always start game with default HD res and allow to change it via options.

I know this is an old thread but i know how to solve your problem.
If you want to detect highest resolution that is users monitor able to use, just simply use node “Get supported Fullscreen Resolutions” which returns array of all possible resolutions that users monitor can do, and the last one in this array, is the highest one.
So jsut set the resolution to the last resolution in that array.
WARNING: This BP node returns resolutions in format without “x” in between. For example 1920x1080 will return as 1920108. So you need to put “x” in between the numbers if you want to execute console command via BP, otherwise the command will not work.

Have a nice day!

2 Likes

Thanks, I’ll try that soon! Looks like the node has been added after my question here, maybe recently? :slight_smile:

BTW. You can click the little arrow near your comment and select ‘convert this comment into an answer’, I would accept it to tidy up the question & mark it as resolved.