diff --git a/Assets/Scripts/Studio/UI/TreeView/HierarchyPooledScrollView.cs b/Assets/Scripts/Studio/UI/TreeView/HierarchyPooledScrollView.cs index 28233183..601b7b1f 100644 --- a/Assets/Scripts/Studio/UI/TreeView/HierarchyPooledScrollView.cs +++ b/Assets/Scripts/Studio/UI/TreeView/HierarchyPooledScrollView.cs @@ -72,6 +72,8 @@ namespace Studio.HierarchyTree visibleItemCount = Mathf.CeilToInt(scrollRect.GetComponent().sizeDelta.y / itemHeight) + 1; searchInput.onValueChanged.AddListener(SearchData); + ManagerHub.instance.Get().onRun += DisallowSiblingEdit; + ManagerHub.instance.Get().onStop += AllowSiblingEdit; //searchCancelButton.onClick.RemoveAllListeners(); //searchCancelButton.onClick.AddListener(CancelSearch); @@ -521,5 +523,13 @@ namespace Studio.HierarchyTree RebuildVisibleItems(); } } + private void AllowSiblingEdit() + { + isSiblingEditable = true; + } + private void DisallowSiblingEdit() + { + isSiblingEditable = false; + } } } \ No newline at end of file