Using UI Constraints to adjust fluidly between devices?

Couldn’t really figure out a good title for this, but the problem is a simple concept. I have a UIGridLayout like this:

On smaller devices I would like to eliminate the second column, but have the buttons extend to the full width, like this:

I’m having trouble finding a way to do this without scripting. If scripting is the way to go, that’s okay, but I am curious if anyone has any solutions for this using purely UI constraints.

1 Like

It would be nice if grid layouts had a ‘column size’ property that would work similar to tables but in the context of this. They would resize the elements to fit the entire single column (if two+ columns don’t fit in the area) or add columns based on how many can fit.

I don’t think it’s possible, currently.

2 Likes

Thanks for the reply. Guess I will go the scripting route unless someone else has a creative solution.

1 Like

Unfortunately this isn’t currently possible with UIGridLayout. We’d have to add a feature that allows the columns to fill the available space, and then you’d be able to parent a UISizeConstraint and set the MinSize to some value in order to achieve this.

Later this year we’re hoping to be able to work on more UI features like this instead of just fixing bugs and tech debt.

3 Likes

Sounds good :slight_smile: thanks for the reply!