Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

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:
    887
  3. Apoorv_Mages

    Apoorv_Mages

    Joined:
    Mar 16, 2020
    Posts:
    1
unityunity