hello, i’m issusing problem with sizing a frame with ui grid layout, what effect i want to achieve on mobile and pc (it should to look the same):
here’s the ui model with a local script that makes frames in-game
GameUUI.rbxm (20.2 KB)
Have you considered using UIAspectRatioConstraints? UIAspectRatioConstraint | Documentation - Roblox Creator Hub
The constraint must be parented to your UIGridLayout.
(Note that I’m currently unable to open up the example as my 2014 MacBook is too old to open up Studio)
i’m already using aspect radio constraint, but where i need to put it? i put it in the image main frame
Another UIAspectRatioConstraint must be put as the child of your UIGridLayout. Since you want your grid items to be square, the AspectRatio must be set to 1.
and after this i can’t even resize my ui normally
You may have misunderstood; the UIAspectRatioConstraint must be parented to the UIGridLayout, not the Items frame.
now everything seemed to be fine but if i add some new frames the padding between them are now huge.
ohh, if i put the padding from scale to offset everything starting to work perfectly fine for all devices!!!
also i didn’t know that the UIAspectRatioConstraint under uigrid doing something, now i know, thank you ![]()
have a good day ![]()
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.