2
\$\begingroup\$

I'm come from WinForm/.NET development, where there is a lot of 'cool' ready made widget like: combo box, list view with scrolling system included.

Now I'm using Unity and I'm trying to implement user GUI, but i'm facing some trouble because as i can see there aren't much ready made widget.

Specifically, I'm trying to implement a saving/loading system and i'm trying to add a window with a list box containing list of saving file.

What's the best widget / approach to do this ?

Thanks

\$\endgroup\$
2
  • \$\begingroup\$ Are you looking for a Dropdown menu? \$\endgroup\$
    – DMGregory
    Commented Mar 28, 2018 at 16:20
  • \$\begingroup\$ No: listbox... Like a dropdown but always opened. \$\endgroup\$
    – stighy
    Commented Mar 28, 2018 at 17:56

1 Answer 1

2
\$\begingroup\$

Looks like you can get this behaviour like so:

  1. Create a new UI->ScrollView

    • Deactivate its horizontal scrolling checkbox
  2. Navigate inside the ScrollView's hierarchy to Viewport -> Content

  3. Add 2 components:

    • Vertical Layout Group (stacks contents vertically)
    • Content Size Fitter - set vertical fit to preferred size (expands container to the size of the list vertically, so it provokes a scroll bar)
  4. Add your content items underneath this parent. They'll automatically stack & scroll when needed.

\$\endgroup\$
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .