merge
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user