Get Viewport size returning wrong value in android in UMG?

Hi UE4 answerhub,

The GetViewPortSize node in UMG returning wrong size while running in android (returning 0).

The same returns 931 while running in editor.

Here I am attaching the screenshot for further comfort .

I’m still getting this in 4.21, I guess it isn’t supported for all platforms… I think you need to use the FAndroidDeviceInfo information in C++ instead.

Not sure what you would do in BP. If you give the widgets a frame to setup you could probably get the cached geometry and use that to get the size of the parent (or reference a main widget that fills the screen and get that geometry).

image
add delay and get viewport size .

always for your reply