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.
- Tabbed headers in editor windows need a style update
- [Android][IL2CPP] App crashes after executing Application.Quit
- [iOS] ReplayKit.APIAvailable returns 'false' on the first call on iOS 13 devices
- Texture preview can be clicked through
- [Progress] Progress bar does not revert to unresponsive status after another task completes