Registering a Search Provider
Register a search provider with the SearchService.
읽는 시간 1분최근 업데이트: 한 달 전
To add a new Search Provider, refer to the examples in the SearchProvider class.
These examples create a function and tag it with the SearchItemProvider attribute:
-
The function must return a newinstance.
SearchProvider -
Theinstance must have the following:
SearchProvider- A unique . For example, Asset, Menu, or
type.Scene?
- A to use in the Filters pane.
displayName
- A unique
-
The optionalprovides a search token for text-based filtering. For example,
filterIdis the filter ID for Asset searches.p:
Registering a Search Provider shortcut
To register a shortcut for a new provider, use:
[UsedImplicitly, Shortcut("Help/Quick Search/Assets")]private static void PopQuickSearch(){ // Open Search with only the "Asset" provider enabled. SearchService.ShowContextual("asset");}
You can map shortcuts to keys or key combinations using the shortcuts manager.