Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Resolved How can you have multiple separators in an enum popup?

Discussion in 'Editor & General Support' started by Rowlan, Sep 2, 2023.

  1. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,810
    Allowing the underscore in an enum to be used as a separator is nice.

    eg this

    upload_2023-9-2_12-13-26.png

    results in this:

    upload_2023-9-2_12-14-35.png

    However, how can you have more than 1? An enum allows only 1 definition to be present.
     
  2. Saniell

    Saniell

    Joined:
    Oct 24, 2015
    Posts:
    164
    Pretty sure [InspectorName("")] should do it
     
    Rowlan likes this.
  3. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    3,899
    More than what?

    Do you want to be able to select 1080p under two different names? Why?
    I also don‘t see how this is related to underscores in the identifiers. The enum shown takes its strings from InspectorName.


    Ooooh, I get it, The underscore-only identifier. Okay, that is actually a hindrance. I would simply replace that with a comment and a custom drawer. ;)
     
  4. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,810
    That worked. Thank you!

    I filed a doc update request with InspectorNameAttribute