private SetSearchFilter ( SearchFilter filter ) : void | ||
filter | SearchFilter | |
return | void |
internal void SetSearchFilter(SearchFilter filter)
{
if (UnityConnect.instance.userInfo.whitelisted && Collab.instance.collabInfo.whitelisted)
{
this.SetSearchFilterINTERNAL(SearchFilter.Split(filter.nameFilter), filter.classNames, filter.assetLabels, filter.assetBundleNames, filter.versionControlStates, filter.referencingInstanceIDs, filter.scenePaths, filter.showAllHits);
}
else
{
this.SetSearchFilterINTERNAL(SearchFilter.Split(filter.nameFilter), filter.classNames, filter.assetLabels, filter.assetBundleNames, new string[0], filter.referencingInstanceIDs, filter.scenePaths, filter.showAllHits);
}
}
HierarchyProperty::SetSearchFilter ( string searchString, int mode ) : void |
private static IEnumerator <T> FindInFolders <T>(SearchFilter searchFilter, Func <HierarchyProperty, T> selector) { foreach (string folderPath in searchFilter.folders) { var folderInstanceID = AssetDatabase.GetMainAssetOrInProgressProxyInstanceID(folderPath); var rootPath = "Assets"; var pathComponents = folderPath.Split('/'); // Find the right rootPath if folderPath is part of a package if (pathComponents.Length > 1 && pathComponents[0] == UnityEditor.PackageManager.Folders.GetPackagesMountPoint()) { rootPath = pathComponents[0] + "/" + pathComponents[1]; } // Set empty filter to ensure we search all assets to find folder var property = new HierarchyProperty(rootPath); property.SetSearchFilter(new SearchFilter()); if (property.Find(folderInstanceID, null)) { // Set filter after we found the folder property.SetSearchFilter(searchFilter); int folderDepth = property.depth; int[] expanded = null; // enter all children of folder while (property.NextWithDepthCheck(expanded, folderDepth + 1)) { yield return(selector(property)); } } else { Debug.LogWarning("AssetDatabase.FindAssets: Folder not found: '" + folderPath + "'"); } } }