Search Issue Tracker

Fixed in 2021.2.X

Fixed in 2019.4.X, 2020.3.X, 2021.1.X

Votes

0

Found in

2020.1.0b1

2020.2

2020.2.0b10

2021.1

Issue ID

1289060

Regression

Yes

[Cloth] [Undo] Errors thrown on performing 'Undo' functionality after changing properties from 'Cloth Constraints' window

Cloth

-

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.
or
Use the shortcut key to perform Undo.

Actual result:
'MissingReferenceException' error thrown in the console.

Expected result:
No error should be thrown in the console and undo functionality performs gracefully.

Reproducible in:
2021.1.0a2, 2020.2.0b10, 2020.1.12f1, 2020.1.b1

Working fine on:
2020.1.a26, 2019.4.14f1

Note: Unable to check on 2021.1.0a3 because of this bug ID [1288691]

Stack trace::
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)

Environment:
Occurring on Windows 10 & macOS 10.15

  1. Resolution Note (fix version 2021.2):

    Fixed in 2021.2.0a4

  2. Resolution Note (fix version 2021.1):

    Fixed in 2021.1.0b9

  3. Resolution Note (fix version 2020.3):

    Fixed in 2020.3.1f1

  4. Resolution Note (fix version 2019.4):

    Fixed in 2019.4.23f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.