- Home /
One-Click-Selection Dropdown
Hi all,
I am familiar with Unity's built-in Dropdown UI list. However, I'm using it for an Android app, and it is tedious to use. i.e. click and drag to scroll...THEN click on the item (normally requires a couple of attempts).
Does anyone know how I could modify thee dropdown to be a one click solution? i.e. Click/press and drag to scroll. As you scroll the option in focus is highlighted. When you release you click/press, select the highlighted option.
Thank you!
I suppose making a prefab of a scrollview object with all your buttons and stuff would work well enough. And then try instantiating it when the tap is held and destroying it on release? Then you can just track the position of each button as you scroll, and whichever element is in the center of the scrollview is the selected one. Finally, have the scrollview trigger the method that is set as the button's on click method when it is destroyed.
Thanks for your reply. It's just a list of strings. no buttons. I can't see how a prefab would help?
Unity has a built in UI object called "scrollview." You can create it like a primitive. You can use that to make a scrollable list of all your list elements, and turn it into a prefab to create later while the game is running.