Search Issue Tracker
By Design
Votes
0
Found in
2018.4
2018.4.27f1
2020.2
Issue ID
1282809
Regression
No
enum of type uint acts as int when serialized with SerializedProperty.intValue
How to reproduce:
1. Open the attached project("EnumFlagsFieldBugReport.zip")
2. Select "ExampleObject1" in the Hierarchy
3. Click on the dropdown of "U Int Flags Field" in the Inspector window
4. Select "Flag 32"
Expected result: Flag gets set to "Flag 32" which is 2^32
Actual result: Flag gets set to "None"
Reproducible with: 2018.4.28f1, 2019.4.12f1, 2020.1.8f1, 2020.2.0b6
Note: Documentation for SerializedProperty.intValue says "When assigning a value to intValue, the value is clamped in the range of the property's declared type", this is not true for uint
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 (2021.1.X):
When setting flags on an enum of type uint SerializedProperty.longValue should be used instead of intValue (so that the bit 32 flag is not lost)