Search Issue Tracker

Fixed in 2018.1.X

Votes

0

Found in

2017.3.0b7

Issue ID

963982

Regression

No

Scene view becomes gray when changing Mesh after painting Cloth Self-Collision in Play mode

Themes

-

Scene view becomes gray when changing Mesh in "Skinned Mesh Renderer" after painting Cloth Self-Collision in Play mode, Console will spam a thousand errors and sometimes Unity Editor will crash.

To reproduce:

1. Create or open any project on Unity
2. Create a "Sphere" gameObject
3. Attach a "Cloth" component to it
4. Select the "Cloth Self-Collision and Inter-Collision" tool
5. Select the "Paint" mode and modify some of the particles
6. Enter Play mode
7. While in Play mode, change the "Skinned Mesh Renderer" "Mesh" to "Plane"
8. Press on Scene tab and double-click "Sphere" gameObject

Expected Result: In Scene view, Unity Editor focus on falling "Sphere - Plane" gameObject
Actual Result: Scene view colorizes itself with Editor Color - it becomes gray, Console spams a thousand errors and sometimes Unity Editor crashes

Notes:
- This issue appears on Windows and OSX
- Stack trace is shared on comments section
- You can double click on other gameObjects like "Main Camera" or "Directional Light" and in Scene view, Unity Editor will focus on these objects, but it will not focus on "Sphere - Plane" gameObject
- If you change "Sphere - Plane" gameObject to "Sphere - Sphere" or "Sphere - Capsule" gameObject, Unity Editor will focus on these objects in Scene view
- When you change the "Skinned Mesh Renderer" "Mesh" to "Plane", you can not rename "Sphere - Plane" gameObject
- These errors will be spammed to the Console:

"IndexOutOfRangeException: Array index is out of range.
UnityEditor.ClothInspector.InitSelfAndInterCollisionSelection () (at C:/buildslave/unity/build/Editor/Mono/Inspector/ClothInspector.cs:434)"

"GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)"

"The targets array should not be used inside OnSceneGUI or OnPreviewGUI. Use the single target property instead.
UnityEditor.GameObjectInspector:OnEnable()"

"The serializedObject should not be used inside OnSceneGUI or OnPreviewGUI. Use the target property directly instead.
UnityEditor.TransformInspector:OnEnable()"

- It's also impossible to use any of the Cloth-related tools in this situation
- The performance in the Scene view is reduced and everything begins to stutter when using "Cloth Self-Collision and Inter-Collision" tool
- Performance does not reduce when using the Constraint tool
- Links to videos are attached lower

Reproduced on Unity 2017.3.0b3, 2017.3.0b7 and 2018.1.0a3
Could not reproduce on 2017.1, 2017.2, 2017.3 alfa and 2017.3.0b* because "Skinned Mesh Renderer" "Mesh" field was broken and
"Cloth Self-Collision and Inter-Collision" tool was not introduced here.

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.