Search Issue Tracker
Fixed in 2021.2.X
Fixed in 2019.4.X, 2020.3.X, 2021.1.X
[Cloth] [Undo] Errors thrown on performing 'Undo' functionality after changing properties from 'Cloth Constraints' window
After adding a cloth component in 3d Object, On editing and undoing the 'Cloth Constraints' or 'Cloth self/ Inter collision' window's properties causes 'MissingReferenceException' error thrown in the console.
Step to Reproduce:
1. Create a New project
2. Hierarchy > 3D Object > Cube
3. Cube > Add Component > Cloth > Edit Cloth Constraint.
4. Change Constraint Property.
5. Edit > Click 'Undo Selection Change' twice.
Use the shortcut key to perform Undo.
'MissingReferenceException' error thrown in the console.
No error should be thrown in the console and undo functionality performs gracefully.
2021.1.0a2, 2020.2.0b10, 2020.1.12f1, 2020.1.b1
Working fine on:
Note: Unable to check on 2021.1.0a3 because of this bug ID 
MissingReferenceException: The object of type 'Cloth' 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.
UnityEditor.ClothInspector.IsConstrained () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/ClothInspector.cs:1776)
UnityEditor.ClothInspector.ConstraintEditing (UnityEngine.Object unused, UnityEditor.SceneView sceneView) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/ClothInspector.cs:1859)
UnityEditor.SceneViewOverlay.WindowTrampoline (System.Int32 id) (at /Users/bokken/buildslave/unity/build/Editor/Mono/SceneView/SceneViewOverlay.cs:110)
UnityEngine.GUILayout+LayoutedWindow.DoWindow (System.Int32 windowID) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUILayout.cs:444)
UnityEngine.GUI.CallWindowDelegate (UnityEngine.GUI+WindowFunction func, System.Int32 id, System.Int32 instanceID, UnityEngine.GUISkin _skin, System.Int32 forceRect, System.Single width, System.Single height, UnityEngine.GUIStyle style) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUI.cs:1767)
UnityEditor.EditorApplication:Internal_CallGlobalEventHandler() (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorApplication.cs:428)
Occurring on Windows 10 & macOS 10.15
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- VFX Blackboard: Duplicated items numbers misses brackets
- [Android] TouchScreenKeyboard.active triggers an error when set to false in the Player
- [Android] Auto-correct suggestions show up over the "hidden zone" when typing text with TouchScreenKeyboard
- [Android] Clicks on the "hidden zone" remain blocked when TouchScreenKeyboard is active
- [URP][DX12] Black Game View window when URP Dynamic Resolution is enabled
Resolution Note (fix version 2021.2):
Fixed in 2021.2.0a4
Resolution Note (fix version 2021.1):
Fixed in 2021.1.0b9
Resolution Note (fix version 2020.3):
Fixed in 2020.3.1f1
Resolution Note (fix version 2019.4):
Fixed in 2019.4.23f1