Search Issue Tracker
Fixed
Fixed in 2022.2.20f1, 2023.1.0b16, 2023.2.0a12
Votes
0
Found in
2021.3.11f1
2022.2.2f1
2023.1.0b10
2023.2.0a8
Issue ID
UUM-21920
Regression
No
Inspector doesn't represent the actual value of unsigned variables when they go beyond the value of their signed equivalents
Reproduction steps:
# Open the attached (UnsignedVariablesTest.zip) project
# Open the “Assets/Scenes/SampleScene.unity” Scene
# Enter the Play Mode
# Select the “Directional Light” GameObject in the Hierarchy window
# Check the “Set Max Uint Value” and “Set Max Ulong Value” boxes under the “New Behaviour Script” Script Component
# Observe the “Uint Value” and “Ulong Value” values in the Inspector window and in the Console
# Try setting the same value in the Inspector window to match the value presented in the Console
# Observe the values in the Console and in the Inspector window
Expected result: Values match between the Console and in the Inspector window
Actual result: The values don’t match between the Console and the Inspector window
Reproducible with: 2020.3.44f1, 2021.3.16f1, 2022.1.24f1, 2022.2.2f1, 2023.1.0a25
Reproducible on: Windows 10 (21H2)
Notes:
* When setting the max value with the “Set Max Uint Value” and “Set Max Ulong Value” fields from the Inspector window, both values report -1 in the Inspector window, however, they are actually set to their max values from the Script and it’s seen in the Console
* When setting the max value of uint in the Inspector window manually it reports the max value of a signed int variable and it doesn’t allow entering a value above it, however, entering a negative value is possible, which shouldn’t be, and the actual value is set to 0
* Similar behaviour as described in the previous notes is also seen with ulong variable. Setting a negative value for ulong from the Inspector window results in a value, which is calculated by subtracting the entered negative value from the max value of unsigned long
* TL;DR Inspector doesn’t represent the actual value once it goes beyond the value of a regular int or long (either in the positive or negative side)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on "The GUID inside 'Assets/asset.png.meta' cannot be extracted by the YAML Parser." when opening the project
- Shadows disappear when looking at a certain angle in Scene view and using Cloud Shadows with Volumetric Clouds
- StackOverflowException freezes or silently crashes the Editor
- Microsoft Surface Device freezes when detaching and reattaching physical keyboard attachment to a Microsoft Surface device in Standalone Player for Windows
- Shadows are cast with artifacts on GameObjects when the light type is set to Point
Add comment