Search Issue Tracker
By Design
Votes
0
Found in
2022.3.54f1
6000.0.30f1
6000.1.0a7
6000.2.0a1
Issue ID
UUM-90166
Regression
No
The RGBA color values are inconsistent when comparing two identical colors set in the Inspector
Reproduction steps:
1. Open the attached “IN-89959_Repro.zip“ project
2. Open the “Assets/Scenes/SampleScene.unity“
3. Check the hex code of the “Part4“ GameObject’s color in the Inspector
4. Select the “Ball“ GameObject in the Hierarchy
5. In the Inspector, check the hex code of the 4th element in the 'Color Arr' array of the Jump Script Component
6. Enter the Play Mode
7. Observe the Console logs
Expected result: Both colors are identical
Actual result: Colors are different even though Inspector shows identical hex codes
Reproducible with: 2022.3.54f1, 6000.0.30f1, 6000.1.0a7
Reproducible on: M1 Max MacOS 14.6.1
Not reproducible on: No other environment tested
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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Resolution Note:
Hi, thanks for reporting this to us. I realize it looks like a bug but it is actually by design. Color comparison can be tricky due to floating-point precision issues. So, in general comparing the exact float values is not recommended. If you have to know if they are the same I'd suggest using a small threshold to do so.
I hope this helps. Best of luck with your project!