Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

EditorGUI.EnumMaskField vs. EditorGUI.EnumMaskPopup

Discussion in 'Documentation' started by Baste, Mar 11, 2017.

  1. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,294
    Looking through the EditorGUI documentation, there are two methods to do exactly the same thing: Show a popup for an enum mask. Both are documented well, and both does not mention the other method.

    The only difference between EnumMaskField and EnumMaskPopup is that the second one lacks the overload without a label. Doing some quick testing, they seem to be doing exactly the same thing as well.

    Looking through the decompiled sources, this division makes sense on the internal side - the EnumMaskPopup has this very nice (internal) version that has out parameters showing which values were changed. The EnumMaskField uses and discards those parameters.
    So there is a difference for Unity's devs, but not for end users of Unity.

    Am I missing something? Could one of these just be deleted? Having two methods that does the same thing with different documentation is pretty strange.
     
    Estecka, Rennan24 and Deni35 like this.