Problem with Get Viewport Size returned Value
We have a problem with the returned value of the fonction "Get Viewport Size".
When we perform the test with the Iphone5S windows size, the value returned is 1000.
If the windows size is configured under the value around 1000, the returned value of size Y is the good one.
We use this value (and need the correct one) to calculate the ratio of the screen. Does anybody else met similar issue or got any solution for this problem?
Thanks in advance!
asked Aug 25 '14 at 02:34 PM in Blueprint Scripting
Ah, I see. When using Simulate or PlayInEditor you will always get the perspective viewport size. You will need to play in New Window mode, Standalone mode, or Mobile Preview to get the correct window size. If using New Window mode, make sure to enable 'Always center window to screen'.
As a workaround, you could grab the edges of the viewport and drag it to the approximate size you need, although this isn't perfectly accurate it may get you by enough to simulate during development.
Another idea would be to feed the values 640x1136 into the blueprint manually while developing, then change the functionality back when you go to publish.
I hope this gives you some ideas. TJ
answered Aug 28 '14 at 05:55 PM
TJ V ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here