I followed the Unity tutorial on Scrolling menus at runtime.
It works quite well. However I see a warning, when adding a Content Size Fitter to the scroll panel, which already has a layout group. (In the video that happens around 12:25 and does not merit a warning).
Parent has a type of layout group component. A child of a layout group should not have a Content Size Fitter component, since it should be driven by the layout group.
The warning would make sense to me, if I had the Content Size Fitter on the children of the scroll panel. But the scroll panels size should not be changed by its Layout group at all, or should it?
Is there a better way to achieve a scroll view in newer versions of Unity or is the warning just appearing in the wrong place?
You should set this up with the Content Size Fitter component and the Vertical Layout Group component on the same object. In you’re situation this would be something like
->Scroll Rect Object (with scroll rect component)
—>Scroll Container (Content Size Fitter and Vertical Layout Group components)
----->Scroll content 1 (With Layout Element component)
----->Scroll content n (With Layout Element component)