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
- URP Realtime reflection probes do not update when RenderProbe() is being called once per second
- Addressable terrain shader variants are stripped from the Player
- [iOS] Debug.Log() appears as <private> in Console app
- UI stays in the background when it is disabled in simulator
- A wrong log file is attached when project is launched with a "-logFile" command line argument
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!