I’m assuming that your using a percent of the screen to set the size of those UI elements.
The reason that they act this way is because when your in studio, you probably have widgets option (explorer, properties, output ect.) Depending on how many of these you have open, it’s gonna change the size of your viewport. The GUI is scaling according to the viewport size when in studio but when you test those widgets go away which increases the screen size in one direction more than the other. This causes the weird scaling.
My Recommendation
When designing UI in studio using scaling, keep in mind that it will look differently (usually more stretched) in the game. Also close all widgets and playtest to check if it’s looking good.
Another alternative is using pixels instead of scaling but this obviously…doesn’t scale with the screen so that may not be a good option for you.
Oh i see i was using a plugin to insert them easier and it made it a diffrent number this worked on the gui i wanted square but not the one i wanted rectangular anything i can do to fix that?
Nope! Moving it doesnt change anything. Though if you want both of those elemets to scale together id suggest putting them both inside one bigger frame that also has UIAspectRatioConstraint, since if you change the resolution those 2 shapes will scale differently, like rectangle might start becoming smaller first and then the square.
Something like this, make it transparent and u will have no issues!
Also correction: You dont have to put UIAspectRatioConstraint inside of them if they are inside of another frame with UIAspectRatioConstraint, but its easier to make sure its the shape you want it to be if all of them have it.
Yes since its resizing it looks smaller, if you want it to always stretch from one side to the other no matter the size id say either dont put UIAspectRatioConstraint inside of it or make it so long that no matter how small screen gets its still stretching fully.
Well that depends on how you want it to look, if you want it to always be stretched from one side to the other id say just make its AspectRatio to like 80 and it should always look like its stretching from one side to the other.