Search Unity

Unity UI Dropdowns seem to be extremely limited

Discussion in 'UGUI & TextMesh Pro' started by Jason_Spree, Mar 14, 2019.

  1. Jason_Spree

    Jason_Spree

    Joined:
    Apr 5, 2018
    Posts:
    7
    Hello!

    I want to make a Dropdown with more advanced functionality, but the only elements of a Dropdown item I can seemingly control are a text string and sprite image.

    I want to show a list of spells in a Dropdown list that includes several attributes such as their icon, name, level and damage, but there does not seem to be any way to do this. I also want to a apply a desaturation material to the spell list items that the player does not own.

    Essentially, I want to add some kind of SpellDropdownItem.cs control script to each Dropdown slot that will then display its respective spell data in the slot and control the list item's interactability and appearance. Surely this is achievable without completely writing my own Dropdown functionality?

    Here is an example of what I'm looking to achieve:

    example.png

    I have tried overwriting various exposed methods of the Dropdown such as CreateItem and CreateDropDownList, but it seems that the source is too locked down to do anything really meaningful with these methods. I am using Unity 2018.1.0f2.

    Any help would be appreciated, thanks!