This commit is contained in:
geondo55
2025-05-29 16:52:57 +09:00
parent 4d4e8927ee
commit c401754e28
2 changed files with 971 additions and 1034 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -46,14 +46,8 @@ namespace Studio.HierarchyTree
public int SetItemData(HierarchyItem item)
{
currentItem = item;
nameText.text = item.name;
CustomAssetRenderObject connectObj = item.linkedObject.GetComponent<CustomAssetRenderObject>();
if (connectObj != null && string.IsNullOrEmpty(connectObj.code))
{
nameText.text += $" ({connectObj.code})";
}
SetName();
currentItem.isExpanded = item.isExpanded;
item.onLoadProgress.RemoveAllListeners();
item.onLoadProgress.AddListener(OnLoadProgress);
@@ -83,6 +77,7 @@ namespace Studio.HierarchyTree
public void SetSelected(bool selected)
{
isSelected = selected;
SetName();
if (isSelected)
{
backgroundImage.color = selectedColor;
@@ -90,11 +85,21 @@ namespace Studio.HierarchyTree
else
{
backgroundImage.color = Color.clear;
}
}
private void SetName()
{
nameText.text = currentItem.name;
CustomAssetRenderObject connectObj = currentItem.linkedObject.GetComponent<CustomAssetRenderObject>();
if (connectObj != null && !string.IsNullOrEmpty(connectObj.code))
{
nameText.text += $" ({connectObj.code})";
}
}
public void SetSelected(List<HierarchyItem> selectedItems)
{
isSelected = selectedItems.Contains(currentItem);
SetName();
if (isSelected)
{
backgroundImage.color = selectedColor;