Search Unity

Dropdown OnpointerClick

Discussion in 'UGUI & TextMesh Pro' started by Irgi, Aug 15, 2019.

  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
     
  2. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
  3. Apoorv_Mages

    Apoorv_Mages

    Joined:
    Mar 16, 2020
    Posts:
    1
    fmadueno and kbrenner like this.