Class QuickSearch
Quick Search Editor Window
Namespace: Unity.QuickSearch
Syntax
public class QuickSearch : EditorWindow, ISearchView
Examples
using Unity.QuickSearch; [MenuItem("Tools/Quick Search %space", priority = 42)] private static void OpenQuickSearch() { SearchService.LoadFilters(); // Set desire filters here... QuickSearch.ShowWindow(); }
Methods
IsFocusedWindowTypeName(String)
Checks if the previously focused window used to open quick search is of a given type.
Declaration
public static bool IsFocusedWindowTypeName(string focusWindowName)
Parameters
Type | Name | Description |
---|---|---|
String | focusWindowName | Class name of the window to be verified. |
Returns
Type | Description |
---|---|
Boolean | True if the class name matches the quick search opener window class name. |
OpenContextual()
Open Quick Search using a global context.
The context is discovered by asking each providers if the current context is suitable for them by calling IsEnabledForContextualSearch
.
Declaration
public static void OpenContextual()
OpenWithContextualProvider(String)
Open the quick search window using a specific context (activating specific filters and such).
Declaration
public static void OpenWithContextualProvider(string providerId)
Parameters
Type | Name | Description |
---|---|---|
String | providerId | Unique name of the provider to start the quick search in. |
Examples
[MenuItem("Tools/Search Menus _F1")] public static void SearchMenuItems() { QuickSearch.OpenWithContextualProvider("menu"); }
PopFilterWindow()
Declaration
public void PopFilterWindow()
Implements
Refresh()
Declaration
public void Refresh()
Implements
SetSearchText(String)
Declaration
public void SetSearchText(string searchText)
Parameters
Type | Name | Description |
---|---|---|
String | searchText |
Implements
ShowWindow(Single, Single)
Open the default Quick Search window using default settings.
Declaration
public static QuickSearch ShowWindow(float defaultWidth = 850F, float defaultHeight = 539F)
Parameters
Type | Name | Description |
---|---|---|
Single | defaultWidth | Initial width of the window. |
Single | defaultHeight | Initial height of the window. |
Returns
Type | Description |
---|---|
QuickSearch | Returns the Quick Search editor window instance. |