public static void Fill(ref Dropdown drop, List <string> labels) { AddDrop.Add(ref drop, labels); if (drop.options.Count > 0) { drop.value = 0; drop.captionText.text = drop.options[0].text; } }
/// <summary> /// Method for save Skill in Static class and in dropdown. /// </summary> public void AddAction() { try { CharacterStatic.skillLable.Add(skillLabel.text); CharacterStatic.skillDescription.Add(skillDescription.text); CharacterStatic.skillValue.Add(Convert.ToInt32(skillLevel.text)); } catch { return; } AddDrop.Add(ref skillDrop, skillLabel); }
public void AddAction() { try { CharacterStatic.eqLable.Add(eqLabel.text); CharacterStatic.eqDescription.Add(eqDescription.text); } catch { return; } Debug.Log(CharacterStatic.eqDescription[CharacterStatic.eqDescription.Count - 1]); AddDrop.Add(ref eqDrop, eqLabel); }
/// <summary> /// Action for save value in static class and dropdown. /// </summary> public void AddAction() { try { CharacterStatic.abilityLable.Add(abilityLabel.text); CharacterStatic.abilityDescription.Add(abilityDescription.text); CharacterStatic.abilityValue.Add(abilityLevel.isOn); } catch { return; } AddDrop.Add(ref abilityDrop, abilityLabel); }