UMG’s DPI scale for the iPhone 4S’ resolution of 640x960 defaults to 0.59. This looks fine in the editor, but on the actual device the scaling is off by quite a large margin. After playing around with the settings, a DPI scale of 0.29 seemed to give the correct results on the device, but looked completely wrong in the editor, and changing the DPI curve in that way threw out the scaling of all the other devices we have. We don’t have any other 640x960 devices to test on, but running the game on PC in a 640x960 window gives different results to the 4S, so it looks like there might be something weird about that device.
I could only find one previous Question on here that seemed to raise this issue, and it was resolved due to a lack of response from the original poster.
I have a few questions for you that will help narrow down what issue it is that you are experiencing.
Quick questions:
Can you reproduce this issue in a clean project?
If so, could you provide a detailed set of steps to reproduce this issue on our end?
Could you provide screen shots of any blueprints that may be involved with this issue?
Could you provide the exact OS that is being run on the device?
To clarify, you are having issue with scaling widgets in the viewport between devices?
If you are having issues with your widgets scaling to fit the current viewport I have a workaround that may be viable depending on your needs so that you can continue to advance in your project while we work to narrow down the issue.
Workaround:
Create a new widget blueprint and name it “Holder”
Place the widget that you would like displayed inside of “Holder” via the user created section
Wrap the widget to be displayed within a Scale box
I was able to reproduce this issue in one of the Example projects, Rolling (Blueprint). I basically just created the project, made a UI widget with an anchored image and a border around it, a button with text and some text on its own, and then just pushed it over the top of the game screen. Here’s what it looks like on PC:
I’ve also attached three screenshots of the Widget, showing the various elements.
To address the rest of your points:
The OS version is 8.3.
If the widgets are anchored at their four corners, they display correctly. But the font size is much larger than it should be, and widgets that are anchored in one corner are displayed much larger as well. In my other project, there was also a case of a scroll-box full of items that are showing as square on PC, but stretched horizontally on iPhone, presumably for the same reason (It’s trying to draw them larger than hey should be; in this case, the Scroll Box is limiting the vertical size, but not the horizontal).
Hope this helps! Let me know if you have any other questions.
We’ve tested the issue on a number of formats. Primarily a Samsung Galaxy Nexus (1280x720), an LG G3 (2560x1440), an iPad 3 (2048x1536) and a Motorola Moto X 2nd Gen (1920x1080), all of which display everything as intended. We’re also running a closed beta test at the moment on about 8-10 different devices, and no-one has mentioned any issues with the UI scaling.
We were able to reproduce this issue on our end. I have written up a report (UE-21815) and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your time and information.
The IPhone4S, by default, will run with a ContentScaleFactor of 1.0, which means that it is running at non-retina, or 320x480, NOT 640x960.
Your DPI scale curve doesn’t go down to 320. Try adjusting your curve, and it should work.
Or, try Windows at 320x480 Or set your DeviceProfiles to set r.ContentScaleFactor to 2 for the base IOS device to run at retina resolution (but then frame rate will be an issue).
If Josh’s solution does not help resolve the issue that you are seeing, this may mean that the issue that you are experiencing is separate from the one that is mentioned in this thread.