#I want the this ui to extend only downwards with the amount of grid objects (content size fitter)

1 messages · Page 1 of 1 (latest)

simple creek
#

I dont really know how i would use the content size fitter to only make it extend downwards, because if i make it extend vertically it extend on both vertical ways up and down.

mortal jolt
#

Your anchors of your rect are set to extend to the height of its parent. you might want to anchor them top and then let the size only grow downwards

simple creek
#

like this? because it didnt change

mortal jolt
#

Never been a big fan of grid layout group. I would have used horizontal layout group with two playername buttons and make them a child of a vertical layout group. But maybe grid layout can achieve that too nowadays

simple creek
#

anchors make my smooth brain hurt

mortal jolt
#

What are you actuallyt rying to do right now with the content size fitter?

simple creek
simple creek
mortal jolt
#

Ah, got it. You can just make it a child of your grid layout group and use the LayoutElement component to ignore the layout and stretch over full width and height

simple creek
#

alright that makes sense ill try that

mortal jolt
#

Basically something like this

simple creek
mortal jolt
#

For me, this results in correct top anchored sizing to bottom:

#

Ah, your pivot is the issue. its y is set to middle, not 1 (top)

simple creek
#

that was my entire isssue haha

#

thanks a lot for helping i normally avoid unitys ui system for a reason i mess up easily lol

#

works great now 👍

mortal jolt
#

Great you figured it out and got it solved 🙂

#

Just be sure to check the thread as solved 🙂