Search Issue Tracker
Fixed in 2022.2.20f1
Fixed in 2022.2.X, 2023.1.X, 2023.2.X, 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
- Uninitialized variable warning appears in the Inspector of a custom shader when the variable is initialized
- "Failed creating toolbar element from ID..." error is thrown when resetting the Scene view Overlay layout while an Asset Transformer Toolbox overlay is active
- Entity ID for Font Assets is serialized twice which throws an error when using Debug Inspector
- Play Mode can be entered when disabling Adaptive Performance and pressing either the Play Mode button or the keyboard shortcut to enter Play Mode before recompilation leading to errors and warnings thrown
- Parent ListView element also becomes selected when inner ListView element is selected
Add comment