how do you add options to the dropdown menu as the game progresses. like
if(this.gamObject.tag == "Fattyblob"){
Call Addtoindex();
}
void Addtoindex(){
add new object int option and sprite and text to dropdown menu
}
how do you add options to the dropdown menu as the game progresses. like
if(this.gamObject.tag == "Fattyblob"){
Call Addtoindex();
}
void Addtoindex(){
add new object int option and sprite and text to dropdown menu
}
It can be done like so
public Dropdown dropDown;
if(this.gamObject.tag == "Fattyblob")
{
Addtoindex();
}
void Addtoindex()
{
if (dropDown != null)
{
dropDown.options.Add(new Dropdown.OptionData("New Option" + dropDown.options.Count));
}
}