Unity树形控件(TreeView)的使用.pdfVIP

  • 1
  • 0
  • 约7.39千字
  • 约 5页
  • 2023-08-20 发布于上海
  • 举报
Unity树形控件(TreeView)的使⽤ 3.点击【GameObject】【Create Empty】,创建⼀个空实体,命名为LoadTreeviewData。 4.创建LoadTreeviewData.cs脚本,打开编辑,将TreeViewDemo中的代码(类名除外)复制到脚本中(全部代码见后⽂)。 5.⾃定义数据给⼤家MyCustomData。 6.在LoadTreeviewData的Start()函数中添加Treeview数据,改写数据绑定ItemDataBinding和节点展开函数ItemExpanding。 7.将TreeView拖⼊变量框,运⾏即可。 using Battlehub.UIControls; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using UnityEngine.UI; public class MyTreeview : MonoBehaviour { public TreeView TreeView; p

文档评论(0)

1亿VIP精品文档

相关文档