Search Issue Tracker
By Design
Votes
0
Found in
2018.4
2018.4.27f1
2020.2
Issue ID
1282815
Regression
No
The "Everything" option in EnumFlagsField is not overridden with unsigned values
How to reproduce:
1. Open the attached project("EnumFlagsFieldBugReport.zip")
2. Select "ExampleObject1" in the Hierarchy
3. Click on the dropdown of "Int Flags Hex All Field" in the Inspector window
Expected results: "Everything" is overridden with "Hex All"
Actual results: "Everything" is not overridden with "Hex All"
Reproducible with: 2018.4.28f1, 2019.4.12f1, 2020.1.8f1, 2020.2.0b6
Comments (1)
-
CodeRonnie
Dec 03, 2020 16:30
The issue really had nothing to do with which flags were enabled. This issue was only ever related to which names are displayed in the editor. If the user includes an element in their enum with a value of ~0, such as All = ~0, then the Everything value that Unity displays by default is not displayed, All is displayed instead. However, this is only true for enums that use int as the underlying type, and it is not true in any case when using an appropriate value equivalent to ~0 defined in the form of 0xFFFFFFFF. The values ~0 and 0xFFFFFFFF are functionaly equivalent, but only ~0 has an effect on which names are displayed in the editor. The bug has nothing to do with the functionality of which flags are enabled or disabled, only what names are displayed in the editor.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
Resolution Note:
As these are flags which are enabled and disabled based on the number underneath it when hex all (0xFFFFFFFF) is selected obviously all the flags will be enabled including Everything as well.
If the user wants to enable only Hex All and disable the rest of the flags, which is not possible.