Search Issue Tracker

Duplicate

Votes

1

Found in

5.3.4p4

Issue ID

792494

Regression

No

[Cloth]Trying to create and select a prefab that has a cloth component throws an exeption

Physics

-

Steps to reproduce:
1. Download and open attached project.
2. Open scene named "Bug".
3. Create an empty prefab inside of "Assets" folder.
4. Navigate to the "hierarchy" window, drag and drop game object named "Dress" to a recently created prefab.
5. Select that prefab.
6. Notice the output of "Console" window:
"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 C:/buildslave/unity/build/Editor/Mono/Inspector/ClothInspector.cs:349)
UnityEditor.ClothInspector.OnEnable () (at C:/buildslave/unity/build/Editor/Mono/Inspector/ClothInspector.cs:261)"
7. Select another asset from "Assets" folder.
8. Select prefab asset again and notice that exception is thrown again.

Expected result:
Selecting prefab that has a cloth component should not throw any exception.

Reproduced with:
5.1.0f3, 5.2.4f1, 5.3.4f1, 5.3.4p6, 5.4.0b18.

Project attached below.

Comments (6)

  1. pritikajiads

    Oct 09, 2023 10:29

    nice

  2. DSL-TailorIt

    Jan 13, 2017 10:55

    This issue is still occuring for me in Unity 5.5.0f3

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.