Search Issue Tracker
Fixed in 5.4.0
GetHashCode() returns 0 for destroyed GameObjects and MonoBehaviours in Builds, but not in the Editor
1. Open the attached project.
2. Open the DictionaryTests.unity scene.
3. Press Play in the Editor.
4. Observe the console output.
5. Note that the log indicates that the contents of the dictionary are identical before and after the gameobject has been destroyed.
6. Open the Build Settings dialog and ensure that DictionaryTests.unity is the only scene in the list.
7. Click Build and Play.
8. Wait for the application to start (click through the screen resolution dialog if necessary).
9. Wait for the application to quit automatically.
10. Open the player log file.
11. Observe the debug output.
12. Note that log now indicates that the hashcode of the destroyed object now changes to zero.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [Profiler] Current frame button initially hides profile frame marker
- [Linux][Hub] Unity Hub 2.4.5 does not open "Add modules" window when clicking "Install with Unity Hub" in Build Settings
- Missing documentation for GetLights
- Broken link in HDRP manual
- Multiple errors appear in the Console when building for IL2CPP