AutomaticSize Studio Beta

This is quite helpful for Everyone!
I guess one of the main reasons for adding this feature is for auto-translated games because of the size of the text that is different in other languages.

Great job!

I just hope Roblox will be able to finish this year’s Roadmap.

1 Like

More info on this would be great. Can you send me a test place where you can repro the issue?

1 Like

I already sent it in the studio bug topic.

1 Like

This is a great feature to add! Regardless of most people probably using this feature for a more basic use, I can’t wait to see what people come up with, I can see a lot of creative features like buttons and loading screens using this feature!

For example, this’d make a great loading screen :eyes:

1 Like

This means I won’t need to update the size of my UI objects every time they change… Thank you very much for this!

1 Like

This is quite useful even if I don’t tend to script, however, I’d like to know what other type of frames will be support to AutomaticSize such as ScrollingFrame, other than that I don’t see any massive issues and hope you keep up the good work since I’m super excited for a planned release of realistic clouds.

1 Like

Hey @rogchamp - yes that’s correct. In the case of the parent frame set to automatically, size, it will size itself to fit the content of the children, in this case whatever the size of the TextLabel is. You can set AutomaticSize on both the Frame and the child TextLabel if you’d like both the parent Frame and the TextLabel to fit the text.

Thank you for trying out the beta, and for your feedback! :hugs:

5 Likes

Hi @IAmPinleon - TextScaled will change the font size to fit the available space of the size of the TextLabel. Without AutomaticSize, the TextLabel size is technically fixed.

The pipeline for TextScaled/AutomaticSize is something like this:

  1. AutomaticSize: calculate the max available space for this TextLabel.
  2. TextScaled: scale to fit the space from step #1
  3. TextScaled: return back the actual amount of space used
  4. AutomaticSize: set the amount of space used as the new size of the GuiObject.

Thank you for trying out the beta! :hugs:

3 Likes

I am in awe. This is exactly what I needed for my game. I have some reference images here of what I’m working on. Anything with the red background is using the AutomaticSize feature, everything to the right is hacked together using Scale values.

This one, the example display is at 1280x720:
image
1366x768:
image
1920x1080:

Serious props to the team and people who worked on the AutomaticSize feature, because this is a lifesaver. I’m super excited and can’t wait for this to get out of beta.

5 Likes

Hi @iiau - so when Automatic Size resizes the object from sizeOld to sizeNew (for example), give the ability to specify a Tween property that determines how the resizing occurs visually? Is that correct?

4 Likes

Hi @TheCarbyneUniverse - I created a ticket to investigate the inset issue you described. As @FilteredDev mentioned, the Size property is indeed unaffected by AutomaticSize. The actual size bounds should be read from AbsoluteSize.

As far as min size goes (speaking of the Size property), the Size property is supposed to act as a “min” bounds for AutomaticSize, although I’ve seen cases where that isn’t happening, so I’ll write up a ticket for that as well. The idea is that the parent’s Size acts as a “max” and Size acts as a ‘min’.

Thanks for trying out the beta and sharing your feedback!

3 Likes

Hi @Lulu_5239 - there is a new property for ScrollingFrame called AutomaticCanvasSize, which is intended to automatically resize the CanvasSize based on the contents of the ScrollingFrame. There is a bug with this feature currently, but we’re working on a fix.

Thanks for your feedback!

2 Likes

Hi @rogeriodec_games - thank you for sharing this bug report! I replied in your other post as well, but I’ve created a ticket to investigate this behavior.

Thanks for trying out the beta!

2 Likes

Hi @Codesense - yes we should have the ScrollingFrame issue resolved soon. Thanks for trying out the beta and for sharing your feedback!

If you want to share more details about the issue with tweening, that’d be great!

2 Likes

Hi @M_antas - all GuiObjects have the AutomaticSize property, included ScrollingFrame! The Frame objects used above were just an example.

Although ScrollFrame itself can use the AutomaticSize property, it’s more useful to use its AutomaticCanvasSize property, which will automatically resize CanvasSize to fit child contents. There’s an issue with this functionality which should be resolved soon.

Thank you for your interest in the beta, and for your feedback!

3 Likes

IS THAT AUTOMATIC SIZE I SEE HNNNNNNNNNNNNNNNNG NO WAYYYYYYYYYYYYYYYYYYY

i am.
so so . so os oso . so so so. excited for this. this is extremely useful for resizing containers with an arbitrary content size. as a matter of fact, this would make creating cooler chat systems magnitudes easier than how it is now. i think.

but no seriously this is actually really poggers and i appreciate this and i appreciate you, guis are finally getting the love they deserve!!

3 Likes

Yes please, this is exactly what we want! What would also be appreciated are two additional properties:

  • TimePerPixel: Per every pixel that is added or subtracted, add this amount of milliseconds to the tween time
  • TimeOffset: The base amount of seconds to tween for.

Final tween time is calculated like so:
Time = (TimePerPixel * PixelDelta) + TimeOffset

You should also consider doing the tweens seperately; one tween for the X axis, and one for the Y, so that if you expand the X field by 200 and the Y by 20 at the same time, then the Y takes less time than the X (as it has less distance to travel).

1 Like

There are two issues I have encountered with the beta feature.

They both seem to be related to:

  • The instance(s) not being a direct child of their LayerCollector
  • Their container’s AutomaticSize properties being left at the default (None)

The expected behavior would be that they function the same out of the box.
OS: Win10


Simple Tween
AutomaticSize_TweenRepro.rbxl (22.7 KB)

The frame successfully loops back and forth across the screen when the beta is disabled or the frame is a direct descendant of the ScreenGui.

The tween is unsuccessful when the beta is enabled, and the frame is not a direct descendant of the ScreenGui.


SurfaceGui
AutomaticSize_SurfaceGuiRepro.rbxl (23.6 KB)
If instance(s) are created every render frame, subsequently deleted the next, and none are a direct child of the SurfaceGui, then they do not render. They do however render after selecting the container in the explorer.

1 Like

Hi @Nabfam - thank you for the suggestion!

One thing I’ve been thinking about with controlling tweens for resizing is the following case: let’s say you have a parent Frame whose AutomaticSize is XY, and has a size of 100x100. Then, you add a child Frame that is 200x200. So the parent frame will need to tween from 100x100 to 200x200.

One issue is that the child Frame will display immediately while the parent Frame’s tween will slowly catch up. So, for as long as the tween takes to execute, the child content will be overflow the parent bounds (visually at least).

I suppose you could set the child content initially as transparent, and when the tween completes, remove the trasnparency?

Thanks for checkout the beta and for your feedback!

1 Like

Hi @UFAIL2 - I’m currently working on a fix that I believe should fix the “simple tween” issue. I’ll file a ticket to investigate the SurfaceGui issue as well.

Thanks for reporting this issue and for trying out the beta!

3 Likes