There are two Dropdown UI objects available, the UI Dropdown object packaged in Unity and the TextMeshPro—Dropdown object that comes with the TextMeshPro asset we discussed in Chapter 6, Text, Images, and TextMesh Pro-Text. Both the Dropdown objects allow the user to select from a list of options. The list becomes visible when the Dropdown is clicked on. Once an object is selected from the list, the list will collapse, making the chosen option visible within the Dropdown (if desired).
The two Dropdown options are pretty much identical in the way they work. The only difference between the two is the UI Dropdown uses UI Text objects to display text while the TextMeshPro - Dropdown uses TextMeshPro - Text objects. Due to this, I will discuss the two objects at the same time in this section. Additionally, because the two objects...