浏览代码

Re-Harmonized RList

/main
Thomas ICHÉ 5 年前
当前提交
30ace063
共有 1 个文件被更改,包括 3 次插入6 次删除
  1. 9
      NaughtyAttributes/Editor/PropertyDrawers/ReorderableListPropertyDrawer.cs

9
NaughtyAttributes/Editor/PropertyDrawers/ReorderableListPropertyDrawer.cs


drawElementCallback = (Rect rect, int index, bool isActive, bool isFocused) =>
{
var element = property.GetArrayElementAtIndex(index);
if(element.hasChildren)
{
rect.y += 1.0f;
rect.x += 10.0f;
rect.width -= 10.0f;
}
rect.y += 1.0f;
rect.x += 10.0f;
rect.width -= 10.0f;
EditorGUI.PropertyField(new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight), element, true);
},

正在加载...
取消
保存