I’ve currently run into a problem where two GUI elements don’t scale properly when trying to emulate a minimized screen, I’ve added a GIF demonstrating my problem below.
Here you can see the gap between the two bars get increasingly larger the more I maximize the screen. In this case, the position is using Scale, while the size is using Offset.
Now the thing is, I understand why this happens, so this isn’t the issue. The real problem I’m trying to solve is how I’m supposed to emulate a minimized screen WITHOUT the gap between the two bars getting larger.
I’ve added a GIF demonstrating what I’m trying to achieve below.
In this case, both bars are using Scale for both the position and size.
And for those who are still confused as to what I’m trying to do, I’m basically trying to emulate the behavior of the bars in the SECOND GIF while using Scale for the position and Offset for the size.
No, not currently. However it may be a bit difficult to do that, because in the actual game itself, the health and mana bars aren’t parented to the same frame, so I don’t want to change anything and mess with any systems I already have. Although I will give it a try and see if anything happens.
I see… there are other ways to do it but it helps to keep them in the same frame so that as resolution changes, they remain positioned within that frame the same way… but if u parent them to the same frame, you still have to set a UIAspectRatioConstraint in that frame, change the aspecttype to ScaleWithParent and pick the dominant axis which i believe will be the X axis.
This can also be achieved using anchor points on the bars, if you find you dont want to parent them to the same frame.