示例#1
0
 static string GetAssetType(SearchItem item)
 {
     if (SearchUtils.GetAssetPath(item) is string assetPath)
     {
         return(AssetDatabase.GetMainAssetTypeAtPath(assetPath)?.Name);
     }
     return(null);
 }
示例#2
0
 static object GetAssetFileSize(SearchItem item)
 {
     if (SearchUtils.GetAssetPath(item) is string assetPath && !string.IsNullOrEmpty(assetPath))
     {
         var fi = new FileInfo(assetPath);
         return(fi.Exists ? fi.Length : 0);
     }
     return(null);
 }