Hierarchy 개발 중
This commit is contained in:
21
Assets/Scripts/UVC/UI/List/Tree/TreeList.cs
Normal file
21
Assets/Scripts/UVC/UI/List/Tree/TreeList.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
#nullable enable
|
||||
using UnityEngine;
|
||||
|
||||
namespace UVC.UI.List.Tree
|
||||
{
|
||||
public class TreeList : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
protected TreeListItem itemPrefab;
|
||||
public TreeListItem ItemPrefab => itemPrefab;
|
||||
|
||||
[SerializeField]
|
||||
protected RectTransform root;
|
||||
|
||||
public void AddItem(TreeListItemData data)
|
||||
{
|
||||
TreeListItem item = GameObject.Instantiate<TreeListItem>(ItemPrefab, root);
|
||||
item.Init(data, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user