Hi, is there any way to get the native monitor resolution in Blueprints?
Hey Stormrage256,
While youāre in blueprints, you should be able to use the function āget viewport sizeā and itāll receive the size of the monitor. I found a few different links that may help you a bit further:
[AnswerHub Post: Get Screen Resolution][1]
[AnswerHub Post: BP Screen Resolution][2]
Hope this helps!
Get screen resolution in blueprint or material - Rendering - Epic Developer Community Forums
[2]: How to set screen resolution with Blueprint? - Blueprint - Epic Developer Community Forums
Hi , Iāve tried using the āget viewport sizeā, but it gives the resolution at which the game window runs right? I was referring to the native screen resolution of the monitor, so that I can set it as the default resolution when the game starts.
Hey Stormrage256,
Have you tried going into the Editor Preferences, under Level Editor and adjusting the resolution size from the Play tab? You should be able to set it to your native resolution there, and the viewport size within the blueprint should then pull from that.
Thanks!
Hi , the setting in the editor preferences would only work for my system. If I want to run in different systems with different native resolutions, I want to get the native resolution of that system. In the current scenario, it will always launch with the resolution that I specified in the editor.
For example, If I set it to 1080p because thatās my native resolution and then I run on another system that has a native resolution of 1920x1200, setting the value in the editor preferences will try to launch the game at 1080p always.
Hey Stormrage256,
You should be able to go ahead and use the blueprint node called āget viewport sizeā and itāll provide you with the x and y values on the screen separately.
Cheers!
That is still not an answer to this simple question. Is there a way in UE4 to get the native resolution of the monitor of the end ?
Only via C++ using generic platfrom APIs in UE4 which let you get info about platform you running in
https://docs.unrealengine.com/latest/INT/API/Runtime/Core/GenericPlatform/FDisplayMetrics/index.html
In blueprint it seems you only get viewport size
Bump! Anyone figure this out yet or do we need to expose the c++ value into blueprints through a UCLASS?
Yea thatās what Iām doing right now as well.
The best I know is that you can do a GetSupportedFullScreenResolutions to get the list of resolutions the monitor support and usually the last index is the best(highest) resolution for the monitor, not sure if thatās what you want.
Get Game Settings > Get Screen Resolution
That will give you the default resolution.
Get Supported Fullscreen Resolution will get you an array of potential resolutions, from smallest to largest.
for those who are still looking , i found out about a node called " Get desktop resolution "
this getās the resolution at which your desktop is running at , (( it does not get the native resolution of screen ))
because windows allows you to run your system in a lower resolution , it will grap that res for you what ever you have your windows using it will grap it.
This is the solution I am looking for. I have a TV which has a native resolution that runs at 60 Hz and the game looks and plays perfect in this resolution. I still have to assume the users will not change their resolution, but that is on them if they tinker. If I choose the last index though in GetSupportedFullScreenResolutions on this TV, I end up with a better resolution but this runs at 24 Hz causing the game to look and play horribly.
For LCD screens, typically the highest resolution the screen is capable of is the native resolution [My Lowes Life][1].
Oh my God. You save me!! Thank you so much.