void SearchInFolders(HierarchyProperty property)
{
List <FilterResult> list = new List <FilterResult>();
string[] baseFolders = ProjectWindowUtil.GetBaseFolders(m_SearchFilter.folders);
foreach (string folderPath in baseFolders)
{
// Ensure we do not have a filter when finding folder
property.SetSearchFilter(new SearchFilter());
int folderInstanceID = AssetDatabase.GetMainAssetInstanceID(folderPath);
if (property.Find(folderInstanceID, null))
{
// Set filter after we found the folder
property.SetSearchFilter(m_SearchFilter);
int folderDepth = property.depth;
int[] expanded = null; // enter all children of folder
while (property.NextWithDepthCheck(expanded, folderDepth + 1))
{
FilterResult result = new FilterResult();
CopyPropertyData(ref result, property);
list.Add(result);
}
}
}
m_Results = list.ToArray();
}