Dropdown only works once
I have a Dropdown with a few items that is hidden until the user taps a certain button. The first time the Dropdown is shown it's fine. But the second time the user taps the button the Dropdown won't expand. The options are still in it, I checked that, but the Dropdown won't show anything but the current value as the Dropdown caption. myDropDown.Show() doesn't do anything. I found something in the archives about an issue relating to timescale, but I'm not doing that. How to get it to behave?
Ok, I found what was causing it for me: I had the Dropdown deactivate in the same function that the Dropdown calls on select. I added a bool to the function and deactivate the Dropdown in Update() now it works fine.
Answer by AMU4u · Feb 25, 2017 at 04:46 PM
I looked at the documentation for dropdown to see what it could be.
I wouldn't be surprised if this is an editor issue and wouldn't happen in the build, but just for giggles go into the coroutine and put debug logs in to where it animates the drop down and see if they fire?
That's where I would go. I check unity tracker and there is nothing about dropdowns for 2017.
Wow thanks, you're right it works, just not visibly. I did a test build, but same issue there. Not sure whats wrong then, maybe I'll try a different method for activating/deactivating it.
As a developer, get used to not trusting unity. LOL! (im kidding any unity people out there, <3)
Answer by icanfly342 · Feb 25, 2017 at 04:16 PM
I have the exact same issue. My dropdown is on an empty object that is activated when a button is clicked. After choosing a value it is deactivated again. The second time it does not react to clicks (no dropping down, nothing) even so all the elements seem ok in the inspector.
Your answer
![](https://koobas.hobune.stream/wayback/20220612090229im_/https://answers.unity.com/themes/thub/images/avi.jpg)