Version: 2021.1

ISearchView

interface in UnityEditor.Search

切换到手册

描述

Search view interface used by the search context to execute UI operations.

变量

contextReturns the current view search context.
displayModeIndicates how the data is displayed in the UI.
filterCallbackCallback used to filter items shown in the list.
itemIconSizeDefines the size of items in the search view.
multiselectAllows multi-selection of items in the list/grid of items. If false, a user can only select a single item.
resultsReturns the list of all search results.
selectCallbackCallback used to override a default Search behavior.
selectionReturns the selected items in the view.
trackingCallbackCallback used to override the tracking behavior.

公共函数

AddSelectionAdds new items to the current selection.
CloseCloses the search view.
ExecuteActionExecutes a Search action on a given list of items.
FocusMake sure the search window is now selected to receive input from a user.
RefreshTriggers a refresh of the search view and refetches all the search items from enabled search providers.
RepaintRequests the search view to repaint itself.
SelectSearchPuts focus in the SearchView text field AND selects all the text inside the text field (if any).
SetSearchTextSets the search query text.
SetSelectionUpdates the search view with a new selection.
ShowItemContextualMenuShows a contextual menu for the specified item.