用起来有一些规则,写个简单的案例以备查阅:
using System.Collections.Generic;
using UnityEditor.IMGUI.Controls;
using UnityEngine;
public class MyTreeView : TreeView {
//搜索控件
SearchField _searchField = new SearchField();
List<object> allData = new List<object>();
public MyTreeView(TreeViewState state) : base(state) {
//构造函数, 需要一个TreeViewState
// 对TreeView进行一些设置
rowHeight &