- Home /
GUI Enum Dropdown
Is it possible to have an enumeration dropdown box as a GUI element in game?
Answer by Bluestrike · Jan 21, 2013 at 05:37 PM
There is a script for this on the wiki http://wiki.unity3d.com/index.php?title=PopupList
Answer by Owen-Reynolds · Jan 21, 2013 at 04:54 PM
As a practical matter, you probably don't want to show the player the actual words anyway. You may have "bigGun" as an enum item, but want to show them ".48 Magnum".
Assuming you can already make a drop down, can make string[] gunWords = {"Barretta", ".48 Magnum" ... }
. Then make the dropdown for those strings and set gun to the item number they selected.
Your answer
Follow this Question
Related Questions
Using an Enum for GUI.Toggle? 1 Answer
EnumPopup in Javascript? 2 Answers
Display TM symbol in enum on GUI 1 Answer
Show enum in a loop in on GUI 1 Answer
How to use EnumPopup 1 Answer