GuiObject.LayoutExempt [boolean, default = false]

As a Roblox developer, it is currently too hard to design UI that can reflow dynamically. If you try to religiously use AutomaticSize, UIListLayout and friends, and UIPadding, you end up creating a lot of container frames because you sometimes want part of a UI to be laid out this way, but not all of it.

I am proposing a property that causes a GuiObject to be exempt from UIListLayout/UIGridLayout/UIPageLayout/etc, UIPadding, and AutomaticSize.

I suppose the CSS equivalent would be display: float. Maybe there’s a better design here. Unless there’s some overarching plan to improve the gui layout system design, I think this would be a great addition to unlock tons of possibilities.

If Roblox is able to address this issue, it would improve my development experience because I could design UI that doesn’t need a huge restructuring every time I realize I forgot something, or want to add some animation.

For example, I have a button that looks like this:
image
The button uses AutomaticSize for XY size, and UIListLayout for layout.

If I wanted to add a Material design-type circular pulse effect when it’s clicked, I would need to completely restructure this. If I could add the effect and set it to be exempt from layout, I could just add it.

7 Likes

This would make UI design 1000x easier, there are so many cases where you have to just make a similar object to the parent just without a ListLayout or parent it where it’s inconvenient for scripts to access.

1 Like

You can actually organise layout instances into folders to limit their scope already :slight_smile:

4 Likes

Cool, nice to know. It would still be helpful for AutomaticSize, though. I know AutomaticSize already doesn’t consider everything, but it’s pretty unclear what the behavior actually is. Perhaps better documentation is all we need?

Also, is this behavior fully supported or is it a side effect? I haven’t seen the gui code in about 6 years, but I don’t recall this being explicitly supported and could break in some circumstances.

Just tested it out with UIPadding and it doesn’t work for that. In fact, UIPadding just doesn’t work at all inside a folder.

1 Like