public void SelectRowWithPath(string path) { foreach (var row in rows) { var rowLocal = (MaintainerTreeViewItem <T>)row; if (rowLocal.data.assetPath == path) { EditorApplication.delayCall += () => { var id = rowLocal.id; SetExpanded(id, true); var childId = -1; if (rowLocal.data.HasChildren && rowLocal.data.children.Count > 0) { var child = rowLocal.data.children[0]; childId = child.id; } FrameItem(childId > -1 ? childId : id); SetSelection(new List <int> { id }); SetFocusAndEnsureSelectedItem(); MaintainerWindow.RepaintInstance(); }; } } }
protected void SelectRowInternal(MaintainerTreeViewItem <T> rowLocal) { EditorApplication.delayCall += () => { var id = rowLocal.id; SetExpanded(id, true); var childId = -1; if (rowLocal.data.HasChildren && rowLocal.data.Children.Count > 0) { var child = rowLocal.data.Children[0]; childId = child.id; } FrameItem(childId > -1 ? childId : id); SetSelection(new List <int> { id }); SetFocusAndEnsureSelectedItem(); MaintainerWindow.RepaintInstance(); }; }