So my menu is almost done. It is made to dynamically create list of items from a specific array and uses VerticalLayoutGroup to make it fit together. So far, so good. But there is one small issue, I don’t know how to resize panel those buttons used for menu reside in to fit it content which results in menus scrollable too far away in case of short menus or menus that have too short scrollable area to see all items (long menus).
If I use RectTransform.rect.height to try to set height, it says it’s read only.
If I try to use sizeDelta, it kinda works, but there is still an unwanted buffer (scrolling past the menu).