作为一个新手,在使用Unity Cloth的时候,根据网上的教程联系的时候,一开始都正常,但忽然有一次报了下面的异常,而且是在两个项目测试都是这个问题。在网上查了也没有发现类似问题,折腾了好久,最后发现是没有配置功能。当点击配置按钮,弹出网格编辑页面,如果直接运行,就会报下面的异常,编辑完后,需要再次点击按钮。
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.ClothInspector+SceneViewClothConstraintsOverlay.OnGUI () (at <60943aacf3074c428e1e44f4528738c7>:0)
UnityEditor.Overlays.IMGUIOverlay.OnPanelGUIHandler () (at <60943aacf3074c428e1e44f4528738c7>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <474af3d613594d458f59aaca66c492a7>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)