Squashed UMG button on Android

Hi

So, this is how the buttons should look like, and they did before I did change the camera aspect ratio:

And this is how they do llok like now:

It’s only the buttons background that gets squashed, all other UMG elements work just fine. And here are the Style settings:

The same settings (Box, Margin: 0,25) for Image elements still work just fine. The buttons work just fine in the editor and in a Windows build or preview. Only the Android buil is affected.

Hello rimau,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. What version of the engine are you using?
  2. Can you reproduce this in a clean project?
  3. If so, could you provide a detailed set of steps to reproduce this issue on our end?
  4. Could you provide more information on how exactly your button in set up (example: What are it’s parent widgets?)?

Hi

Just yesterday I have found a reason and the solution in one.

So I will try to be as clear as possible :wink: As the only way to go down below 50MB with the .apk is to delete some content from the Slate folder I was messing around with the fonts. These were simply giving the best results but as I was playing around with camera aspect ratio at the same time this led me to false conclusions.

So what was really responsible for the deformation was deleting the Fonts folder before packaging the game. So if you delete the Fonts folder the buttons with background images set as Box get deformed. I am 100% sure of that at the moment.

But there is a solution. What you need to do is leave the Fonts folder in place and delete every font but Roboto Regular. If you leave this one font file (160kB) the buttons are rendered fine. What I need to add is that I did change the Roboto font to my custom font everywhere (that I know of) in the project settings so the font should not be used at all by the app.

As for the additional info that you requested:
the version is 4.7.5 and the buttons that were affected were always placed inside the horizontal boxes (so maybe this where the problem comes from), other than that there was nothing else but what you can see on the screenshot in the original question