Need help creating a scrollable list
I attempted to follow this blog to create a scrollable list: http://www.folio3.com/blog/creating-dynamic-scrollable-lists-with-new-unity-canvas-ui/
...except instead of their class "Animal", I created my own class that only had a couple of string members. I'm not interested/worried about adding images at this point. (So there also isn't an image in my prefab. It's only text objects.)
The one problem I ran into was that when I added "Content Size Fitter" to the 2nd panel object, and set "Vertical Fit" to "Preferred Size", there is an error message that "Parent has 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." Besides that, everything looks correct, but when I run it, my list doesn't show and I don't know how to troubleshoot it.
I am just trying to create a scrollable list.
I'm using Unity 2017.3.0f3. I'm fairly new to Unity (but an experienced programmer generally).
Answer by victorbisaev · Jan 29, 2018 at 01:40 AM
Please check that there is only one "Content Size Fitter" in your hierarchy. It should be on "ContentContainer", not on "ScrollViewCanvas" or "ListItem". If there is only one - then it should be OK.
Your answer
![](https://koobas.hobune.stream/wayback/20220612145949im_/https://answers.unity.com/themes/thub/images/avi.jpg)