Hello, i am experiencing a problem when trying to use a vertical layout with a series of buttons in a scroll view.
i followed the tutorial here Recorded Video Training: Shop UI with Runtime Scroll Lists - Unity Learn to create my scroll, view, and everything seems fine when examining my non-prefab button (ie, the one that exists in the hierarchy after i create it, see below).
However, when create a prefab and then instantiate and add dynamically, they don’t appear as the correct size (see below, the red and green buttons with the images are the prefab buttons), they are somewhat smaller in both width and height.
i have a vertical layout and a content size fitter attached to the content of my scrollview, and my buttons have layout elements of a certain min width and height.
does anyone know why instantiating a prefab would mess up the button dimensions, while the button in the hierarchy remains the correct size.