Automatic Size Property: Now Available

I’m not a UI developer, but I do have basic knowledge and the skills to build them.

I made a basic model that is just a part with a surface gui adorned to it.What it does is makes HTTP Request using the Wikipedia API to retrieve information in-game (I’m making a basic “computer” system for immersion). However, since some Wikipedia articles are a treasure trove of information even after clearing all the markup tags (sadly it returns the contents of the page in XML Format) the text doesn’t fully fit into the TextLabel. I have planned out a system that checks the length of the string in the TextLabel and then removes that number characters from the beginning of the original string. Then (using a ListLayout) I create a new TextLabel and set the text to the remaining text and repeat this process until there are no characters left in the original string.

I have not yet implemented this yet though, and am wondering whether or not the the Automatic Size Property respects the maximum length for the TextLabel Text property.

P.S. - The search I used to test my creation is “Apple.” It is a surprisingly long article.

2 Likes

While using AutomaticSize with a UIAspectRatioConstraint, I am experiencing text overflow depending upon the AnchorPoint.

When the Y AnchorPoint is set to 0, the following behaviour is exhibited:


As you can see, the text is spilling from the frame and not being automatically sized as it should be.

However, when the Y AnchorPoint is set to 0.5, the following behaviour is exhibited:


As you can see, the text is correctly sized and the frame is resizing to fit the text in, this is the desired behaviour, except for the fact that I need the Y AnchorPoint to be set to 0.

This issue is also only exhibited when the aspect ratio constraint causes the width of the UI to be resized smaller than it would otherwise be. By this, I mean that at this resolution the UI is exhibiting proper behaviour:

but when the width of the screen is any larger than you have the text spilling issue.

The Y UDim of these elements is set to 0,0.

Amazing update! Now we don’t have to use TextScaled for GUIs, which is pretty much a pain if we want to make chatter system, as the text size will be changed constantly to fit into the GUI. Now we can make the GUI size itself to fit with the character.

Woohoo! I am so happy Roblox has pushed out this update. Finally something insanely useful in UI design!

when you use a UI ratio aspect constraint, the automatic size won’t work since it’s supposed to keep the UI constraint true.

The automatic size should work, the automaticsize is only resizing the Y not the X, while UIAspectRatio resizes the X

I have been having an issue that doesn’t occur all the time, and it’s very irritating when it happens. When I had AutomaticCanvasSize turned on; it wouldn’t resize the canvas at all until the value was changed manually (which is what most of my UI doesn’t do) or when something is added. Due to most of my ScrollingFrames not resizing; I am unable to access some parts of the frame.

Has anyone else had an issue similar to this?

1 Like

Brilliant!

Can’t wait for the UIBlur property next! :smiley: Blur behind UI elements - #6 by DrRanchDressing

4 Likes

I’ve noticed that the Size of the parent doesn’t take into account the childs SizeConstraint property.

image
Parent frame without Child
Parent.Size = UDim2.new(0.1, 0, 0.1, 0)
Parent.SizeContraint = RelativeYY

image
With Child
Child.Size = UDim2.new(1, 0, 1, 0)
Child.SizeConstraint = RelativeYY

image
What I expected to see

Automatic Size Repo.rbxm (2.6 KB)
Duplicate the Child to see the issue gets worse

3 Likes

Hi! I was trying to use AutomaticSize today, however, all of the UI in our game has a UIScale object at the root of the ScreenGui to take care of UI scaling for different resolutions. Because of this, we ran into all of the above mentioned issues. Are these issues currently being worked on, and if so, is there an expected date for a fix?

3 Likes

can you please add Y to automatic resize please

image
They did??

1 Like

This is great! Unfortunately it does not work with a UIScale that does not have the scale set to 1. Is that something that could be fixed?

3 Likes

Looks great! Maybe it would look better with TweenSize, not Size?

Will this property handle ui objects with ClipsDescendants enabled in the future? I have certain UI elements that expand past the border of a UI frame, but get cut off by ClipsDescendants. AutomaticSize doesn’t seem to take this into account yet and will resize the frame as if the children of ui objects with ClipsDescendants enabled are visible past the parent border

@DrRanchDressing Hello!

I found an issue with AutomaticCanvasSize that is really weird I have filed a bug report

1 Like

With this implemented, I am no longer getting concerned on how to update the ScrollingFrame’s CanvasSize so it can fit with the amount of content inside it, as it is now automatically. Bravo!

2 Likes

Hi @SillyMeTimbers - apologies for the late response on this, I went ahead and created a ticket to investigate this issue. Thank you for the bug report!

1 Like

Hi @JohnnyMorganz - apologies for the late response, however I wanted to update you that I have a fix for your issue that is currently being reviewed. I referenced your original post and have confirmed that the fix resolves your issue.

The fix should arrive in about 2-3wks, assuming no further issues are discovered during testing/deployment.

Thanks for your original bug report and following up in this post!

1 Like

@DrRanchDressing Hey, you disabled this feature on my game a while back because of issues we were having, but I’m wondering if it’s been re-enabled or if the issues have been fixed or have an ETA? It’s been about two and a half months now.

For reference, here’s our original report to you: AutomaticSize Studio Beta - #92 by Shawnyg

When you disabled this on our game, it fixed the major issues we had with some guis. However, we’ve been seeing reports that some similar bugs are still popping up. Not sure how related this is, but it looks exactly like the original issue we had with Automatic Size. I’ll explain the bug below. I believe this has only been reported since Automatic Size property.

Expected Behavior:

Reported Actual Behavior:

This is just a close-up of someone’s screen of the same GUI I posted above. You can see the frame on the right side containing the image and details is very squished and unusable.

And here is the gui structure in Studio:

It seems only a few players experience this issue, and I don’t think it happens 100% of the time for them. I haven’t encountered this bug myself.

I asked a couple players about their device and frequency of the bug, this is their response:

PS - I also really want to start using this feature because we’re redoing some guis for the game, and I’m seeing places where this would be great to use.

5 Likes