ドキュメント

Unity Engine

Unity Engine

CreateItem

Helper function to create a new search item for the current search provider.
読み終わるまでの所要時間 5 分最終更新 1ヶ月前

Definition

CreateItem(SearchContext, string, int, string, string, Texture2D, Object)

Helper function to create a new search item for the current search provider.
public SearchItem CreateItem(SearchContext context, string id, int score, string label, string description, Texture2D thumbnail, object data)

Parameters

Search context from the query that generates this item.

Unique ID of the search item. This is used to remove duplicates in the user view.

score

Relevance score of the search item. The relevance score is used to sort all the results per search provider. Lower relevance scores indicate more relevance and are shown first.

label

Relevance score of the search item. The relevance score is used to sort all the results per search provider. Lower relevance scores indicate more relevance and are shown first.

description

The search item description is displayed on the second line of the search item UI widget.

thumbnail

The search item thumbnail is displayed to the left of the item label and description as a preview.

data

The search item thumbnail is displayed to the left of the item label and description as a preview.

Returns

Type

Description

SearchItemThe newly created search item attached to the current search provider.

Remarks

CreateItem(string, int, string, string, Texture2D, Object)

Helper function to create a new search item for the current search provider.
注意
Deprecated. Use CreateItem which take a SearchContext
public SearchItem CreateItem(string id, int score, string label, string description, Texture2D thumbnail, object data)

Parameters

Unique ID of the search item. This is used to remove duplicates in the user view.

score

Relevance score of the search item. The relevance score is used to sort all the results per search provider. Lower relevance scores indicate more relevance and are shown first.

label

Relevance score of the search item. The relevance score is used to sort all the results per search provider. Lower relevance scores indicate more relevance and are shown first.

description

The search item description is displayed on the second line of the search item UI widget.

thumbnail

The search item thumbnail is displayed to the left of the item label and description as a preview.

data

The search item thumbnail is displayed to the left of the item label and description as a preview.

Returns

Type

Description

SearchItemThe newly created search item attached to the current search provider.

Remarks

CreateItem(SearchContext, string)

Helper function to create a new search item for the current search provider.
public SearchItem CreateItem(SearchContext context, string id)

Parameters

Search context from the query that generates this item.

Unique ID of the search item. This is used to remove duplicates in the user view.

Returns

Type

Description

SearchItemThe newly created search item attached to the current search provider.

Remarks

CreateItem(string)

Helper function to create a new search item for the current search provider.
注意
Deprecated. Use CreateItem which take a SearchContext
public SearchItem CreateItem(string id)

Parameters

Unique ID of the search item. This is used to remove duplicates in the user view.

Returns

Type

Description

SearchItemThe newly created search item attached to the current search provider.

Remarks

CreateItem(string, string)

Helper function to create a new search item for the current search provider.
注意
Deprecated. Use CreateItem which take a SearchContext
public SearchItem CreateItem(string id, string label)

Parameters

Unique ID of the search item. This is used to remove duplicates in the user view.

label

Relevance score of the search item. The relevance score is used to sort all the results per search provider. Lower relevance scores indicate more relevance and are shown first.

Returns

Type

Description

SearchItemThe newly created search item attached to the current search provider.

Remarks

CreateItem(string, string, string, Texture2D, Object)

Helper function to create a new search item for the current search provider.
public SearchItem CreateItem(string id, string label, string description, Texture2D thumbnail, object data)

Parameters

Unique ID of the search item. This is used to remove duplicates in the user view.

label

Relevance score of the search item. The relevance score is used to sort all the results per search provider. Lower relevance scores indicate more relevance and are shown first.

description

The search item description is displayed on the second line of the search item UI widget.

thumbnail

The search item thumbnail is displayed to the left of the item label and description as a preview.

data

The search item thumbnail is displayed to the left of the item label and description as a preview.

Returns

Type

Description

SearchItemThe newly created search item attached to the current search provider.

Remarks

CreateItem(SearchContext, string, string, string, Texture2D, Object)

Helper function to create a new search item for the current search provider.
public SearchItem CreateItem(SearchContext context, string id, string label, string description, Texture2D thumbnail, object data)

Parameters

Search context from the query that generates this item.

Unique ID of the search item. This is used to remove duplicates in the user view.

label

Relevance score of the search item. The relevance score is used to sort all the results per search provider. Lower relevance scores indicate more relevance and are shown first.

description

The search item description is displayed on the second line of the search item UI widget.

thumbnail

The search item thumbnail is displayed to the left of the item label and description as a preview.

data

The search item thumbnail is displayed to the left of the item label and description as a preview.

Returns

Type

Description

SearchItemThe newly created search item attached to the current search provider.

Remarks