zoukankan      html  css  js  c++  java
  • unity cloth遇到的问题的解决

    在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面板中,再进行修改

    THISSKY出品,原文链接:http://www.cnblogs.com/zhuhongjongy/p/4878726.html

  • 相关阅读:
    9-15
    9-5
    8-26
    8-24
    7-20
    7-17
    我离职后要干些什么
    6-18
    5-28
    5-20
  • 原文地址:https://www.cnblogs.com/zhuhongjongy/p/4878726.html
Copyright © 2011-2022 走看看