UMG Widget Scale Box Problem

Hello guys, I have a problem about this and I don’t know what causing this. I hope some of you know about this and I really want to know your opinion about this.

I’m creating a Shop Template that will be used for selling weapon and normal item. If I click the weapon, it will show the weapon info and if it is an item, it will show the item info. Both of the info are inside a widget switcher so I only need to switch the Index of it. However, there is a behavior that I don’t like and I don’t know what causing this.

When I click the Weapon and switch to the Item, the widget is somewhat like zoomed (Which is not what I want). Maybe you will know the problem better if you watch the video I upload below. The problem is happening when I click the Weapon slot and Item slot.

do you have any idea or information regarding this? Thank you very much

1 Like

For anyone who encounter the same problem with me, I think I finally found the solution regarding this.

After doing some trial n errors, I figured something about this kind of scale box problem.

For my case, the main problem is inside my scale box, there is a scroll box. I will explain my theory of why it’s happening. If I put a scroll box inside a scale box, and the scroll box content is really long (pretty long that make it scrollable), the scale box will try to scale the scroll box content to fit in without needed to scrolling. So if your content is longer and longer, other elements inside the scale box will be affected for example image will be smaller, text size will be smaller, and others.

This is how I fixed it.
I wrap my scroll box with a Size Box, and give it a height override with 0 value. I did that and now the scale box won’t try to fit all of the content and make every other elements are in the correct size.
image
image

by the way, this is occured on a widget order like this (maybe you won’t notice this problem with your’s order):
Scale Box
Vertical Box

Scroll Box
Vertical Box

Scroll Box

Hope this help!

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