Search Issue Tracker
Fixed
Votes
0
Found in
5.3.4f1
Issue ID
814206
Regression
No
UnityEngine.Object.Equals incorrectly handles comparisons to a non-UnityEngine.Object derived class
[This happens when the first object is assigned to null]
Steps to reproduce the issue:
1. Open attached project.
2. Open scene named "Default".
3. Enter the play mode.
4. Notice the output of the "Console" window:
foo equals bar: True
bar equals foo: False
List item 0: bar
Actual result:
"object.Equals(objA, objB)" returns true if objA is pointing to null despite the fact that objB is not pointing to null. This might cause unexpected behavior when removing a specific item from the list. Yet, if objA is not pointing to null and objB is pointing to null, the output is correct.
Expected result:
"object.Equals(objA, objB)" should return false if objA is pointing to null and objB is not pointing to null.
Reproduced with:
5.3.2f1, 5.3.5p8, 5.3.6f1, 5.4.0f1, 5.5.0a3.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- PlayerPrefs get corrupted when a minimized fullscreen Player is closed through the Taskbar
- "To Debug, run app with -diag-job-temp-memory-leak-validation cmd line argument. This will output the callstacks of the leaked allocations." warning is printed when JobTempMemoryLeakValidation switch is enabled
- Main Thread stalling when loading Audio Source asset asynchronously while preloading another Audio Source asset
- Material artifacts occur in the Material Preview window when baked lighting is applied to scenes
- “ArgumentOutOfRangeException” after saving, reseting and re-add Default Tile Palette Tools to the list in Preferences window
Add comment