Search Issue Tracker
Fixed in 2019.2.X
Votes
0
Found in
2019.1.0a14
Issue ID
1115810
Regression
Yes
Nested Prefabs - MissingReferenceException when discarding changes to a prefab with a CapsuleCollider attached
If you are editing a prefab with a capsule collider attached and then discard the changes you made by leaving isolation mode, the following exception will occur:
MissingReferenceException: The object of type 'CapsuleCollider' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
As a knockon, the next time you select the prefab or any instance of it in the hierarchy, several more exceptions will occur.
1. Install Unity
2. Open the attached project
3. Find GameObjectWithCapsuleCollider.prefab in the assets folder
4. Open the prefab in isolation mode
5. Make sure that autosave is turned OFF
6. Move the transform
7. Exit isolation mode and discard all changes
Expected Result:
The changes are discarded and no exceptions occur.
Actual Result:
A MissingReferenceException occcurs.
Tested on Windows.
Occurs on 2019.2.0a1, 2019.1.0a14
Does not occur on 2018.3.0f2, 2019.1.0a13
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [HDRP] Game view renders artifacts when Camera's Component "Post Anti-aliasing" is set to "TAA" and Dynamic Resolution's "Forced Screen Percentage" is changed
- A deactivated Prefab's name color becomes white when a GameObject in the scene is deactivated
- The Game view becomes blank when using Frame Debugger with MSAA and Texture binding enabled in Play Mode
- Crash on dynamixel_sdk.dynamixel:groupSyncReadTxRxPacket when entering Play Mode after updating path to Dynamixel SDK in script
- NullReferenceException is thrown when changing the Inspector preview selection
Resolution Note (fix version 2019.2):
Exception should no longer appear.