CreatePickerState
Create a SearchViewState specially setup to show an Object Picker.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: UnityEditor.Search
- Assembly: UnityEditor
CreatePickerState(string, SearchContext, Action<Object, bool>, Action<Object>, string, Type, SearchViewFlags)
Create a SearchViewState specially setup to show an Object Picker.
public static SearchViewState CreatePickerState(string title, SearchContext context, Action<Object, bool> selectObjectHandler, Action<Object> trackingObjectHandler, string typeName, Type filterType, SearchViewFlags flags = SearchViewFlags.None)
Parameters
Title of the picker window.
SearchContext used to setup whcih SearchProvider and initial query are setup for this Picker.
Selector Callback.
Callbacks triggeeds when the select selects an item.
Name of the type of assets or components we want to pick.
Type of the items we want to pick.
Flags specifying how the picker view should be displayed.
Returns
Type | Description |
|---|---|
| SearchViewState | Returns a view state use to open an Object picker. |
CreatePickerState(string, SearchContext, Action<SearchItem, bool>, Action<SearchItem>, Func<SearchItem, bool>, SearchViewFlags)
Create a SearchViewState specially setup to show an Object Picker.
public static SearchViewState CreatePickerState(string title, SearchContext context, Action<SearchItem, bool> selectHandler, Action<SearchItem> trackingHandler = null, Func<SearchItem, bool> filterHandler = null, SearchViewFlags flags = SearchViewFlags.None)
Parameters
Title of the picker window.
SearchContext used to setup whcih SearchProvider and initial query are setup for this Picker.
Selector Callback.
Callbacks triggeeds when the select selects an item.
Filtering calback.
Flags specifying how the picker view should be displayed.
Returns
Type | Description |
|---|---|
| SearchViewState | Returns a view state use to open an Object picker. |