Incompatibility "Vertical Layout Group" and "Content Size Fitter"

Hello
I’m trying to make a UI similar to the WhatsApp interface, messages are appearing from top to bottom and the scroll continues down. I’m using a Scroll View for it.

I have created each message as a Button (test mode), with a Layout Element component attached.

The problem is in Content GameObject, it has:

A Vertical Layout Group component to add messages vertically.
A Content Size Fitter component so that the Content is resized when the conversation grows.

Vertical Layout Group has the Child Alignment to Upper Left so that the first message is placed there and grows down.

When I activate the Content Size Fitter, that Child Alignment is not respected and forces the message to be placed in the center, losing the behavior that I want.

Could someone help me with this problem please?

Thank you.

Solved, the problem was the pivot point.

Content Size Fitter begins in the Content pivot line.

1 Like

Thanks @chustuoso