I need to add X objects to a scrollview. I do it like this:
GameObject statsObject = Instantiate(instance.statsObjectPrefab); statsObject.transform.SetParent(statsParent.transform);
statsParent is the content container if the scrollview.
Scrollview ---- Viewport -------- Content // This is statsParent
In the pause I see that then objects are added successfully, but they all overlap and no scrollbar is visible.
The content has a content size fitter and a vertical layout group, but I tried now all settings and the result is always the same.
I use Unity 2019.2