public Dropdown AddDropdown(DropdownData dropdownData) { var dropdown = UserInterface.Instance.CreateDropdown(dropdownData); dropdown.transform.SetParent(this.inputs); return(dropdown); }
public Dropdown CreateDropdown(DropdownData dropdownData) { var dropdown = Instantiate(this.dropdownPrefab, this.canvas.transform, false); if (dropdownData.options != null) { dropdown.options = dropdownData.options; } if (dropdownData.onValueChanged != null) { dropdown.onValueChanged.AddListener(dropdownData.onValueChanged); } return(dropdown); }