Search Issue Tracker

Duplicate

Votes

2

Found in

5.4.3f1

Issue ID

851101

Regression

No

Cloth inspector throws errors when game object is inactive

Physics

-

When selecting a gameobject that contains a cloth component, if the gameobject is disabled then the Editor will throw an error.

Reproduction steps:
1. Open the scene "Scene" in the attached project
2. Select the "Plane" gameobject
3. Observe the following errors in the Console:
Mesh.colors is out of bounds. The supplied array needs to be the same size as the Mesh.vertices array.
UnityEditor.ClothInspector:OnEnable()

IndexOutOfRangeException: Array index is out of range.
UnityEditor.ClothInspector.SetupSelectedMeshColors () (at D:/UnityDEV/5.0-branch/Editor/Mono/Inspector/ClothInspector.cs:356)
UnityEditor.ClothInspector.OnEnable () (at D:/UnityDEV/5.0-branch/Editor/Mono/Inspector/ClothInspector.cs:266)

Expected result:
Disabled cloth objects shouldn't throw errors.

Reproducible in versions 5.4.3f1, 5.5.0f1, and 5.6.0a4.

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.