하이어라키 트리 UI에 드래그 드랍 권한 기능 추가

This commit is contained in:
geondo55
2025-03-18 16:18:40 +09:00
parent 9fdedcc4d4
commit 8c9e46de4b
2 changed files with 15 additions and 4 deletions

View File

@@ -612,6 +612,14 @@ PrefabInstance:
propertyPath: m_Size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3692082455671801088, guid: c7fa5154df436e54bb0b444dfc25575d, type: 3}
propertyPath: isDraggable
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3692082455671801088, guid: c7fa5154df436e54bb0b444dfc25575d, type: 3}
propertyPath: isSiblingEditable
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3853414527505018043, guid: c7fa5154df436e54bb0b444dfc25575d, type: 3}
propertyPath: m_AnchorMax.x
value: 1
@@ -658,7 +666,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 4494893725557815844, guid: c7fa5154df436e54bb0b444dfc25575d, type: 3}
propertyPath: m_Value
value: 1
value: 1.0000204
objectReference: {fileID: 0}
- target: {fileID: 5185907358101567880, guid: c7fa5154df436e54bb0b444dfc25575d, type: 3}
propertyPath: m_Maskable

View File

@@ -35,6 +35,9 @@ namespace XED.Hierarchy
public UnityEvent<List<HierarchyItem>> onSelect;
public UnityEvent<HierarchyItem, HierarchyItem> onParentChanged;
public bool isSiblingEditable;
private void Awake()
{
content = UtilityFunction.FindDeepChild(transform, "Content").GetComponent<RectTransform>();
@@ -331,7 +334,7 @@ namespace XED.Hierarchy
}
public void SetToChildItem(HierarchyItem srcItem, HierarchyItem destItem)
{
if (srcItem == null || destItem == null)
if (srcItem == null || destItem == null || !isSiblingEditable)
return;
if (selectedItems.Contains(srcItem))
{
@@ -384,7 +387,7 @@ namespace XED.Hierarchy
}
public void SetToNextSiblingItem(HierarchyItem srcItem, HierarchyItem destItem)
{
if (srcItem == null || destItem == null)
if (srcItem == null || destItem == null || !isSiblingEditable)
return;
if (selectedItems.Contains(srcItem))
{
@@ -437,7 +440,7 @@ namespace XED.Hierarchy
}
public void SetToPriorSiblingItem(HierarchyItem srcItem, HierarchyItem destItem)
{
if (srcItem == null || destItem == null)
if (srcItem == null || destItem == null || !isSiblingEditable)
return;
if (selectedItems.Contains(srcItem))
{