- Home /
Dynamically adding (prefab) Buttons to a ScrollView
I have a scrollview which I am adding prefab buttons to.
The Scrollview has a content child with:
Grid Layout Group (Horizontal, fixed one row)
Content Size Fitter (width=preferred, height=preferred)
My prefab buttons have an Image only with the following props:
Layout Element (no boxes checked)
My Problem: The images are really big, a small portion of one of the buttons takes up the whole content view. I've tried these same exact properties on vanilla buttons I add, and they display just fine. I think it has something to do with the image I'm setting on the Button, or possibly the lack of the baked-in text child (seems unlikely, though).
Any help would be greatly appreciated.
Comment