And this triggers an error that says that a Content size fitter component cannot be in a child of a parent that has a layout.
One workaround i found is to add a Layout Element component to the “dynamic” child and set it’s min width & min height to the text mesh pro preffered width & preffered height values.
But for that an extra script is required and it needs to be reasigned every time the text changes aswell.
No, I think there is no unity way to do it other than ignoring the warning (which actually works anyway in many situations).
But maybe you don’t need a layout group. Maybe you can achieve your goal with the right anchor settings.