Search options used to fetch items. Mostly with SearchContext to specify how a search should be handled.
using System.Collections; using System.Collections.Generic; using UnityEditor; using UnityEditor.Search; using UnityEngine; public class SearchFlags_NoIndexing { [MenuItem("Examples/SearchFlags/NoIndexing")] public static void RequestAll() { // Find all assets matching the word Search without using any indexed data (will rely on the Find Files provider). SearchService.Request("p: Search", (SearchContext context, IList<SearchItem> items) => { foreach (var item in items) Debug.Log(item); }, SearchFlags.NoIndexing); } }
None | No specific search options. Result will be unsorted. |
Synchronous | Search items are fetched synchronously. This can take a long time for some SearchProvider (like asset). Use at your own risk. |
Sorted | Fetched items are sorted by the search service. |
FirstBatchAsync | Sends the first items asynchronously. |
WantsMore | Sets the search to search for all results. This might take longer than unusual if SearchProvider are using multiple sources of items (files on disk, AssetDatabase...) |
Debug | Adds debugging information to SearchItem while looking for results. |
NoIndexing | Prevents the search from using indexing. Asset Provider will use its builtin Find in Files provider. |
Expression | Indicates that the search query will be evaluated as a search expression. |
QueryString | Evaluate the search text as a pure query string (do not evaluate the text as a search expression). |
Packages | The Object Picker window will include any results from packages. |
Default | Default Search Flag (SearchFlags.Sorted). |
ShowErrorsWithResults | Always show query errors even when there are results available. This flag is only usable with internal API. |
SaveFilters | Indicates that the search view will save its settings and search provider filters when it closes. This flag is only usable with internal API. |
ReuseExistingWindow | Indicates that the search view will find any existing window instances that are already opened before creating a new one. This flag is only usable with internal API. |
Multiselect | Indicates that the search view will allow multi-selection. This flag is only usable with internal API. |
Dockable | Indicates that the search view is dockable. This flag is only usable with internal API. |
FocusContext | Indicates that the search view will focus on the first contextual search provider available when it opens. This flag is only usable with internal API. |
HidePanels | Indicates that the search view will hide its side panels when it opens. This flag is only usable with internal API. |
OpenDefault | Opens a search view with default options. This flag is only usable with internal API. |
OpenGlobal | Opens a search view for a global search. This flag is only usable with internal API. |
OpenContextual | Opens a search view with default contextual options. This flag is only usable with internal API. |
OpenPicker | Opens a search view as an object picker. This flag is only usable with internal API. |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.