UI.Dropdown - where to store data value
I've been using a UI.Dropdown object to represent a list of armor a player has. The armor currently selected in the Dropdown represents the armor the player has equipped.
When the armor is changed in the Dropdown, I need to modify the armor ID in the Player's data. However, all I have to go on is DISPLAYED in the Dropdown: the NAME (String value) of the armor. I really need a place to store the armor's ID (int). When working with Dropdowns in other development software, there is often both a visible data field and a hidden data field for an ID. Any ideas on how to handle this?
Comment