Search Unity

Feedback GenericMenu. Add "Sort" method

Discussion in 'Editor & General Support' started by Peter77, Apr 8, 2019.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    It would be quite useful, if you could add a "Sort" method to GenericMenu, that sorts the added GUIContent in alphabetical order.

    I'm doing this pretty much everywhere and having this snippet in GenericMenu itself, would make that way easier.

    Bonus points if you make the Sort method accept an IComparer or similar, to implement custom sorting rules.
     
    sjk000 likes this.