Hi there guys!
I’ve recently started doing the UI of my game, and for some reason the Shop Button doesn’t want to stay in place.
As you can see in the following screenshots, the Daily Rewards button stays in place, on every device.
I can scale the windows to the minimum size, it will still be there.
But for the Shop Button it isn’t the same.
Both of the buttons have the anchorPoint set to {0.5,0.5}, scale being controlled by the UIAspectRatioConstraint.
How could I make it stay in place, just like it shows up in Studio ?
How are you positioning the buttons?
Firstly I set their anchor to {0.5, 0.5} (For both of them)
And after that I just drag them to that part of the screen, setting the UIAspectRatioConstraint to FixWithinMaxSize
Check the Position property on those then, it’ll look something like {0.08, 0},{0.57, 0}
where the first numbers are scale (percent of screen space) and the second one are offset (pixels) for the X, and Y dimensions.
UIAspectRatioConstraint affects the sizing, not the positioning of an element.
You’ll want to check to make sure that both of them are specified in scale, not offset. Using scale instead of offset helps make GUI’s more flexible for various screen sizes.
The next thing to check is the “ScreenInsets” property of the ScreenGui’s the elements are inside of and making sure they line up between them. Usually you would want “CoreUiSafeInsets” unless you’re specifically placing a UI element in the Top Bar area.
added everything inside one GUI and it worked (the shop button was in another gui and couldn’t get it fixed