Class QuickSearch | Quick Search | 1.5.4
docs.unity3d.com
    Show / Hide Table of Contents

    Class QuickSearch

    Quick Search Editor Window

    Inheritance
    Object
    QuickSearch
    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
    ISearchView.PopFilterWindow()

    Refresh()

    Declaration
    public void Refresh()
    Implements
    ISearchView.Refresh()

    SetSearchText(String)

    Declaration
    public void SetSearchText(string searchText)
    Parameters
    Type Name Description
    String searchText
    Implements
    ISearchView.SetSearchText(String)

    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.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023