private string[] GetDependencies(DependantInfo assetDependantInfo) { var dependencies = assetDependantInfo.Dependencies .Where(x => x != current.AssetPath) .OrderBy(x => x) .ToArray(); if (string.IsNullOrEmpty(searchText)) { return(dependencies); } var list = new List <string>(); var keywords = searchText.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); for (var i = 0; i < keywords.Length; ++i) { keywords[i] = keywords[i].ToLower(); } foreach (var item in dependencies) { var isMatch = item.IsMatch(keywords); if (isMatch) { list.Add(item); } } return(list.ToArray()); }
private void Set(Object target) { var assetPath = AssetDatabase.GetAssetPath(target); current = new DependantInfo(assetPath); dependencies = GetDependencies(current); Repaint(); }