码迷,mamicode.com
首页 > 编程语言 > 详细

unity cloth遇到的问题

时间:2015-10-14 21:43:46      阅读:204      评论:0      收藏:0      [点我收藏+]

标签:

 

在unity 5.x开发中遇到了一个很郁闷的问题,这个问题不会影响你的游戏的运行,但是却会使你在演示或是交流的时候出现尴尬。技术分享

问题描述: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:337)
UnityEditor.ClothInspector.OnEnable () (at C:/buildslave/unity/build/Editor/Mono/Inspector/ClothInspector.cs:249)

看到这两个代码,就知道不是自己的代码的问题,但是又很担心是不是自己写的代码与Unity中的cloth模块冲突了。

其实这个问题普遍会出现在对Resource中的资源导入时出的错误。如果你直接在Resourse文件夹中更改Prefab的参数,当在导入Resourse文件夹中cloth布料时就会出现上述问题。如果非要调节参数,最好是将文件拉到Hierarchy面板中,再进行修改

 

unity cloth遇到的问题

标签:

原文地址:http://www.cnblogs.com/zhuhongjongy/p/4878726.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!