/// <summary>
    /// Convert the specified list of delegate entries into a string array.
    /// </summary>

    static public string[] GetNames(List <Entry> list, string choice, out int index)
    {
        index = 0;
        string[] names = new string[list.Count + 1];
        names[0] = string.IsNullOrEmpty(choice) ? "<Choose>" : choice;

        for (int i = 0; i < list.Count;)
        {
            Entry  ent = list[i];
            string del = UGUIEditorTools.GetFuncName(ent.target, ent.name);
            names[++i] = del;
            if (index == 0 && string.Equals(del, choice))
            {
                index = i;
            }
        }
        return(names);
    }