Unity Issue Tracker - MissingReferenceException occurs when entering Play mode with a locked GameObject in the Inspector
Open
UUM-121369
MissingReferenceException occurs when entering Play mode with a locked GameObject in the Inspector
Unity: Inspector Framework
Open
6.6.X
6.5.X
6.4.X
6.3.X
6.0.X
In Progress
6.7.X
Won't Fix
6.2.X
Unity 6000.2 has reached its end of life and will not receive further updates. If you need additional fixes, please upgrade to a newer Unity version.
Reproduction steps:
0. Make sure your Enter Play Mode Settings are set to "Reload Domain and Scene", no other mode reproduces the issue.
1. Create a new Unity project
2. Create a new empty MonoBehaviour script
3. Add a GameObject to the scene
4. Add the MonoBehaviour (from Step 2) to the GameObject (from Step 3)
5. Add a Collider (e.g., BoxCollider) to the same GameObject
6. Lock the GameObject in the Inspector, by clicking on the padlock icon in the top-right corner of the Inspector
7. Enter the Play Mode
8. Observe the Console
Expected result: No errors occur
Actual result: "MissingReferenceException: The object of type 'NewMonoBehaviourScript' has been destroyed but you are still trying to access it." error is thrown