- Home /
Dropdown OnValueChanged no dynamic Value
Hello, I have trouble withe the UI Dropdown. It seems like I can't pass the selected value to the OnValueChanged Event. I tried adding a reference to a method which takes exactly one int but I am not offered to use the dynamic value (selected value). Only static values work.
I simply created the Dropdown via ContextMenu -> UI -> Dropdown. What do I need to do in order to make it work?
What is odd also, is that the inspector shows "On Value Changed ()" while the manual reads "On Value Changed (int32)".
My version is 2019.2.5f1 personal. Thanks!
I've worked around the issue by giving the listener a reference to the dropdown and subscribing to OnValueChanged from code.
myDropdown.onValueChanged.AddListener(Foo);
This works but I need to pass a reference to the dropdown around which is annoying. I'd rather tell the dropdown which actions to perform. So if anybody knows why this does not work for me, your input is very welcome.
Same issue here. I think there is a problem with Android platform as currently I can't see dynamic values with dropdowns. Checkbox for example works as it should.
I have the same issue too using the Android platform, upgraded to 2019.2.5f1 and cant see any "Dynamic value" section to select functions from. however the values I've had set in previous version is still working but is being showed in inspector like " and if I alter it, it wont work anymore. must be a bug, please report if you can.
I'm on 2019.2.8f1 now and it looks like the problem has been fixed
Follow this Question
Related Questions
dropdown menu after effects 1 Answer
How can i make dropdown menu which opens within Menu? 0 Answers
Cannot edit appearence of dropdown UI Unity 5.6 1 Answer
Make Dropdown List Scroll When Bottom Option is Selected With Controller? 1 Answer
Check marks in my dropdowns and disappearing UI elements... 1 Answer