[Bug Report] No Screen Resolution info in Standalone

Hello everyone,

i am experiencing an error with Get Viewport Size inside PlayerController.

For this i created an empty new Project and the error still exists.

As you can see, if i read the resolution info in Editor play, i get the right values.
But when i start the game in Standalone i get 0, so my update to any widgets wont work.

Or tell me what im missing :wink:

Best regards

[DxDiag][1]

A solution for this in C++ is to use UGameUserSettings class to get the resolution. I don’t have a blueprint solution for this. That class also has some usefull functions for setting resolution and window mode of the game.

 UGameUserSettings* UserSettings = GEngine->GetGameUserSettings();
 FIntPoint res = UserSettings->GetScreenResolution();

hey there,

thanks for your reply, but i do not look for a workaround and i even dont think that its a proper to read the game res out of a config file (assuming that is what GetGameUserSettings does)

I only want to inform about this bug :wink:

and why the hell am i not able to post comments inside my own posts???

regards
^^

Ok I understand :slight_smile: , just wanted to give you a workaround if you needed it now before they go about fixing it.

Hello ,

After looking into this issue. I believe that this is working as intended. What I mean by this is that the node you are using to call the viewport size is the “Event begin play” node and this node does not wait for the window to be up fully before starting to fire off. If you place a delay immediately after the “Event begin play” node I believe you will see your viewport size. This further supports the theory. I hope that this helps. I would like to thank you for your time and information regarding this issue.

Make it a great day