Ejemplo n.º 1
0
 private IEnumerable<SearchItem> SearchIndex(SearchContext context, SearchProvider provider, SearchIndexer indexer)
 {
     #if DEBUG_TIMING
     using (new DebugTimer($"Search index ({context.searchQuery})"))
     #endif
     {
         return indexer.SearchTerms(context.searchQuery).Select(r =>
         {
             var gameObjectId = Convert.ToInt32(r.path);
             var gameObject = EditorUtility.InstanceIDToObject(gameObjectId) as GameObject;
             if (!gameObject)
                 return null;
             return AddResult(provider, r.path, r.score, false);
         });
     }
 }