Version: 2023.2
public Search.SearchItem CreateItem (Search.SearchContext context, string id, int score, string label, string description, Texture2D thumbnail, object data);
Obsolete public Search.SearchItem CreateItem (string id, int score, string label, string description, Texture2D thumbnail, object data);
public Search.SearchItem CreateItem (Search.SearchContext context, string id);
Obsolete public Search.SearchItem CreateItem (string id);
Obsolete public Search.SearchItem CreateItem (string id, string label);
public Search.SearchItem CreateItem (string id, string label, string description, Texture2D thumbnail, object data);
public Search.SearchItem CreateItem (Search.SearchContext context, string id, string label, string description, Texture2D thumbnail, object data);

参数

context Search context from the query that generates this item.
id 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.

返回

SearchItem The newly created search item attached to the current search provider.

描述

Helper function to create a new search item for the current search provider.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961