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.
- Terrain inspector is proposing a shader which isn't there
- Warnings are missing when compiling for certain platforms (opengl)
- Scaling problem with PanelSetting set to ScaleWithScreen/Expand
- [Hub] Editor is shown in the "Installing" state indefinitely when the installation fails due to INVALID_DESTINATION error
- IL2CPP: Nested Try-Catch and Throw statement results in incorrect behaviour