Unity 社区

创建Rule Tile 的时候报错

,3 年前
发布于技术支持
1

问题描述

安装Tile 的 2d-extras-2020.3包后,创建Rule Tile时出现了错误代码。

Unity版本

2020.3.31

平台

相关代码

ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <695d1cc93cca45069c528c15c9fdd749>:0) System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <695d1cc93cca45069c528c15c9fdd749>:0) UnityEditor.RuleTileEditor.GetElementHeight (System.Int32 index) (at 2d-extras-2020.3/Editor/Tiles/RuleTile/RuleTileEditor.cs:281) UnityEditorInternal.ReorderableList.CacheIfNeeded () (at <8e360fe5aace4538a03be0587b26460f>:0) UnityEditorInternal.ReorderableList.DoListElements (UnityEngine.Rect listRect, UnityEngine.Rect visibleRect) (at <8e360fe5aace4538a03be0587b26460f>:0) UnityEditorInternal.ReorderableList.DoLayoutList () (at <8e360fe5aace4538a03be0587b26460f>:0) UnityEditor.RuleTileEditor.OnInspectorGUI () (at 2d-extras-2020.3/Editor/Tiles/RuleTile/RuleTileEditor.cs:532) UnityEditor.UIElements.InspectorElement+<>cDisplayClass59_0.<CreateIMGUIInspectorFromEditor>b0 () (at <5b3c67ecf94144358824df756e1fb6eb>:0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
ArgumentException: Getting control 1's position in a group with only 1 controls when doing repaint Aborting UnityEngine.GUILayoutGroup.GetNext () (at <27d9b60c5b794cb2a1577bb267b886a8>:0) UnityEngine.GUILayoutUtility.DoGetRect (System.Single minWidth, System.Single maxWidth, System.Single minHeight, System.Single maxHeight, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at <27d9b60c5b794cb2a1577bb267b886a8>:0) UnityEngine.GUILayoutUtility.GetRect (System.Single width, System.Single height, UnityEngine.GUILayoutOption[] options) (at <27d9b60c5b794cb2a1577bb267b886a8>:0) UnityEditorInternal.ReorderableList.DoLayoutList () (at <8e360fe5aace4538a03be0587b26460f>:0) UnityEditor.RuleTileEditor.OnInspectorGUI () (at 2d-extras-2020.3/Editor/Tiles/RuleTile/RuleTileEditor.cs:532) UnityEditor.UIElements.InspectorElement+<>cDisplayClass59_0.<CreateIMGUIInspectorFromEditor>b0 () (at <5b3c67ecf94144358824df756e1fb6eb>:0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

错误日志

484 次浏览
评论 0
1个回答
0
如果你是下载了我教程里提供的插件,很可能版本不符。你使用了 Unity2020.3 那么直接在package manager里打开 preview package 搜索 2D-Extra 就可以看见,直接下载就是对应的版本。
3 年前回答
评论 0

AI

全新AI功能上线

1. 基于Unity微调:专为Unity优化,提供精准高效的支持。

2. 深度集成:内置于团结引擎,随时查阅与学习。

3. 多功能支持:全面解决技术问题与学习需求。

AI