0
\$\begingroup\$

enter image description here

this is basic dropdown Ui object

I want to make it ,if I click dropdown, show every elements but

can only select top element others not.

like this image, because I made tutorial.

enter image description here

how can I restrict other element to select?

\$\endgroup\$

2 Answers 2

0
\$\begingroup\$

You can create your custom drop down and setup Interactable to false for options you are not able to select. Or you need to modify Dropdown script, better copy it and rename then setup Interactable opiton for your items list.

\$\endgroup\$
3
  • \$\begingroup\$ Create custom drop down from scratch is the easiest way to do this task. You probably won't need all the features of Unity dropdown. \$\endgroup\$
    – Bogdan
    Commented Jul 17, 2023 at 16:04
  • \$\begingroup\$ This answer would be more useful if it explained how to create a custom drop down from scratch. \$\endgroup\$
    – DMGregory
    Commented Jul 17, 2023 at 16:16
  • \$\begingroup\$ Thnaks to reply answer. I will try do that \$\endgroup\$ Commented Jul 21, 2023 at 8:15
0
\$\begingroup\$

enter image description here

On picture DropDown - button OnClick -> DropDownFields->gameObject.Active(true); Green Red Blue - fields with buttons. when onClick->{SelectFieldAction();DropDownFields->gameObject.Active(false)} To DropDownFields you need to add components ContentSizeFilter and VerticalLayoutGroup. And you have custom ScrollDown you can add as many field as you need and setup Interactable for each button true of false.

\$\endgroup\$

You must log in to answer this question.

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