Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Dropdown OnpointerClick

Discussion in 'UIElements' started by Irgi, Aug 15, 2019 at 7:28 AM.

  1. Irgi

    Irgi

    Joined:
    Apr 4, 2018
    Posts:
    5
    Hi guys, i'm still learning about ui.
    i'm trying to make a dropdown where the option will be added when you click the dropdown. i'm trying to use Dropdown.OnpointerClick but i still don't know how to use it. here is the sample code that i'm trying to try:
    Code (CSharp):
    1. public Dropdown dropdown1;
    2. public List<string> names;
    3.  
    4. dropdown1.OnPointerClick(); //i want to use dropdown1.AddOptions(roles) here, but i dont know how to use this