Example #1
0
    void GetDeckList()
    {
        List <string> list = DeckLoad.GetDeckNameList();
        List <Dropdown.OptionData> dropDownList = new List <UnityEngine.UI.Dropdown.OptionData>();

        for (int i = 0; i < list.Count; i++)
        {
            dropDownList.Add(new Dropdown.OptionData(list[i]));
        }
        deckDropDown.options = dropDownList;
    }
Example #2
0
    void InitDeckNameDropDown()
    {
        deckNameList = DeckLoad.GetDeckNameList();
        List <Dropdown.OptionData> list = new List <Dropdown.OptionData>();

        for (int i = 0; i < deckNameList.Count; i++)
        {
            string str = deckNameList[i];
            Dropdown.OptionData data = new Dropdown.OptionData(str);
            list.Add(data);
        }
        deckNameDropDown.options = list;
    }