Scale, center and preserve aspect ratio at the same time in UMG

Hello folks.

What I am trying to achieve is just stretch child UI item and place it in the center of the parent at the same time. Child item have to preserve aspect ratio and stretch vertically or horizontally depending on possibility. But content have to be placed in the centre. Simple illustration:

I spend hours by mixing and parenting elements but no success.
It is just very unintuitive or it is really impossible in UE.
By using SizeBox content always placed it left-upper corner. This is result for my grid cell:
Screenshot 2024-04-19 163257
Screenshot 2024-04-19 163250

Is it really that hard?

Like this?

Almost) It have to preserve aspect ratio.

As I publish I occasionally get proper set up. I had to set Size Box as a child of Scale Box and it is very significant to have min/max resolution set for Size Box. Here is my settings:

Sorry for bothering, but I believe It have to live as a post!)

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.