Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


CreatePickerState

Create a SearchViewState specially setup to show an Object Picker.
Read time 1 minuteLast updated 10 days ago

Definition

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

Title of the picker window.

SearchContext used to setup whcih SearchProvider and initial query are setup for this Picker.

selectObjectHandler

Selector Callback.

trackingObjectHandler

Callbacks triggeeds when the select selects an item.

typeName

Name of the type of assets or components we want to pick.

filterType

Type of the items we want to pick.

Flags specifying how the picker view should be displayed.

Returns

Type

Description

SearchViewStateReturns 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

Title of the picker window.

SearchContext used to setup whcih SearchProvider and initial query are setup for this Picker.

Selector Callback.

trackingHandler

Callbacks triggeeds when the select selects an item.

Filtering calback.

Flags specifying how the picker view should be displayed.

Returns

Type

Description

SearchViewStateReturns a view state use to open an Object picker.