- Home /
dropdown uses a generic list and not a built-in list -- why?
Why does the ui dropdown us a List instead of a string[] ? It seems the latter is more memory efficient and most cases you already know what the values would be before run time, so the array does not need to change size...
Well, in some cases you would need to change the size at runtime. Not to mention generic Lists have a fair bit of functionality that arrays do not. I'm assu$$anonymous$$g either the memory difference between the two and their uses in Unity are insignificant, or they need to use Lists for something. I know when I implemented dropdowns in the old UI system, I ended up having to switch to generics (although I can't remember why). I'll see if I can look more into the functionality of the new UI dropdowns.
Your answer
Follow this Question
Related Questions
How to make dynamic dropdown to choose items in an Array? 2 Answers
Remove specific screen resolutions 0 Answers
A problem with the dropdown items 0 Answers
Move Dropdown using arrow buttons 0 Answers