File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,6 +66,11 @@ class GroupItem : BaseItem
6666 {
6767 public BuildLayout . Group source ;
6868
69+ public GroupItem ( )
70+ {
71+ supportsSearch = true ;
72+ }
73+
6974 public override int CompareTo ( TreeViewItem other , int column )
7075 {
7176 var otherItem = other as GroupItem ;
Original file line number Diff line number Diff line change @@ -14,12 +14,14 @@ namespace Oddworm.EditorFramework.BuildLayoutExplorer
1414 public class GroupsView : BuildLayoutView
1515 {
1616 [ SerializeField ] BuildLayoutTreeView m_TreeView ;
17+ SearchField m_SearchField ;
1718
1819 public override void Awake ( )
1920 {
2021 base . Awake ( ) ;
2122
2223 m_TreeView = new GroupTreeView ( window ) ;
24+ m_SearchField = new SearchField ( window ) ;
2325 }
2426
2527 public override void Rebuild ( BuildLayout buildLayout )
@@ -39,7 +41,10 @@ public override void OnToolbarGUI()
3941 {
4042 base . OnToolbarGUI ( ) ;
4143
42- GUILayout . FlexibleSpace ( ) ;
44+ GUILayout . Space ( 10 ) ;
45+
46+ if ( m_SearchField . OnToolbarGUI ( GUILayout . ExpandWidth ( true ) ) )
47+ m_TreeView . searchString = m_SearchField . text ;
4348 }
4449 }
4550}
You can’t perform that action at this time.
0 commit comments