Problem with UI scaling

Hi developers, i have a problem with a UI for a plugin. Basically it doesn’t scale with the plugin widget:

The gui as normal gui:

The gui in the widget

The gui is in scale size

In the widget the gui objects are stretched and smaller:

image

Do you have any idea on how to fix this?

2 Likes

Maybe try using this plugin:

It should help you scale things properly in your UI with the use of UIAspectRatioConatraint. Also, make sure that you are not using pixels as your size and offset, as they can change your UI size depending on the device.

Nothing is in offset as i used that plugin to scale everything, also where should i put the UIAspectRatioConatraint? The main frame of the gui or in every object of the gui?

1 Like

I believe you put the constraint in the main frame of the UI, but I could be wrong. I don’t think you need to put it in all of the individual components of the frame.

Well it doesn’t change anything, it just make a white area appear.

UI Aspect ratio constraint tries to maintain the ratio regardless of screen size, relative to one of 2 axis. By default i believe it tries to maintain 1 to 1 ratio, meaning it will create a square. In this case, you will need to make it relative to x axis and set ratio to your ideal ui’s size Y divided by size X.

Should I do it through script?

Sorry i’m having some problems, i don’t really understand how to use the UIAspectRatioContraint, if i put it into the gui i have this:

image

The properties:

image

The explorer

image

I would appreciate if you can make me understand. :slight_smile:

1 Like

Could you tell me the plugin link/name? I take a look at it and try to answer your problem.

I’m using autoscale light [Plugin] AutoScale Lite for GUIs - Scale your UI

Hmm, have you tried increasing the size of the gui, rather than the offset? Also is that dialog editor a plugin you created or something you got from the library, maybe I could help you more.

What do you mean by increasing the size of the gui? The background has a size of 1,0,1,0 and no i didn’t get the plugin from the library, it’s mine

Oh nevermind then, thought I could help you.

Could have the gui help you to understand?

1 Like

I solved the problem. I just needed to set everything to scale size and put a UIAspectRatioConstraint in the objects that were being stretched a bit.

1 Like