private void ClearAndRefillDropDowns() { firstPlantDropDown.options.Clear(); secondPlantDropDown.options.Clear(); var options = plantBag.GetTypes() .Select(type => new Dropdown.OptionData(type.name)).ToList(); firstPlantDropDown.options.AddRange(options); secondPlantDropDown.options.AddRange(options); }
private void Awake() { global.plantSelection.Selected = plantBag.GetTypes()[0]; selectionText.text = global.plantSelection.Selected.Name; foreach (var type in plantBag.GetTypes()) { CreatePlantSelectionButton(type); } UpdateSeedCounts(plantBag.GetSeedCounts()); }