Dropdown is placed inside a panel with
ContentSizeFitter/LayoutGroup with preferred size set, it appears to take just 10x10 units, no matter what the contents are. How can I make Dropdown's preferred size adhere size of its contents, i.e. size of its biggest option?
The option child control sizes inside the panel paired with the content size fitter seems to be a bit buggy, because it's not wrapping the contents of the dropdown recursively.
I tested a couple times, and i think you should either Disable the option from the panel object:
use a script and set the DROPDOWN OBJECT Width+Height yourself, using a layout Element componnent;
OR (workaround without using scripts)
- Turn off 'Child control Size'
- Remove/Readd dropdown
- Add layout Element component to Dropdown
- Click Preferred Width , Preferred Height
- Re-enable 'Childcontrol Size' if its nescessary for your needs;