Search Issue Tracker
Fixed in Unity 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.
- [Presets] DefaultInpector type needs to be blacklisted
- Default Inspector Header is shown when double clicking on a scene
- [LWRP] Base map is missing on some materials after upgrading LWRP package
- Metal error when using subsurface scattering in HDRP
- gameObject.SendMessage doesn't accept value as a function argument correctly in the .NET 4.x Scripting Runtime