Quantcast
Channel: UGUI & TextMesh Pro
Viewing all articles
Browse latest Browse all 23263

Unity DropDown UI - Select/Deselect option inside a dropdown via C# script

$
0
0
Hi everyone!
I am trying to implement a piece of code that selects/deselects options inside a dropdown via script.
I already know how to capture a dropdown selection via mouse click using an OnValueChanged listener.

I've researched the methods available on the Unity reference and there are Select(), OnSelect() and OnDeselect() methods there.
However, I have no idea how to implement them in practice and how they work!
The reference only specifies a very general code:

public void OnDeselect...

Unity DropDown UI - Select/Deselect option inside a dropdown via C# script

Viewing all articles
Browse latest Browse all 23263

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>