コード例 #1
0
    public void PopulateMenu(IEnumerable list, string current, DropdownMenu dropDown)
    {
        dropDown.ClearList();
        dropDown.ClearListeners();

        foreach (string item in list)
        {
            dropDown.AddList(item, current);
        }

        dropDown.droptDown.RefreshShownValue();

        dropDown.droptDown.onValueChanged.AddListener(delegate { Save(); });
    }