//Converts data to Item object, and adds it to dropdownItems List.
    public virtual void DataToItem(string name, Sprite sprite)
    {
        CustomDropdown.Item item = new CustomDropdown.Item
        {
            itemName        = name,
            itemIcon        = sprite,
            OnItemSelection = new UnityEngine.Events.UnityEvent()
        };

        customDropdown.dropdownItems.Add(item);

        item.OnItemSelection.AddListener(delegate()
        {
            customDropdown.ChangeDropdownInfo(customDropdown.dropdownItems.IndexOf(item));
        });
    }
 public override void UpdateValue()
 {
     customDropdown.ChangeDropdownInfo(GetValue());
 }