UI Change scale with its child

Hello!

How I can make my message box scale with its child?
Putting content size fitter on both didnt work at all. I want that text and text box to scale vertical like the text itself.

Thanks!

up

edit: I tried using horizontal group thing which makes my message box awkwardly big

There was a way I always forget…
I think it was like this:

  • Parent object has a content size fitter
    – Child Text object has a (vertical) layout group

I was not aware of this for a long time, so I implemented a different approach in my Asset Better UI.