GetPreview(SearchContext, Vector2, FetchPreviewOptions, bool)
Gets the search item preview if available, otherwise the preview is fetched at this time.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Method
- Namespace: UnityEditor.Search
- Assembly: UnityEditor
public Texture2D GetPreview(SearchContext context, Vector2 size, FetchPreviewOptions options = FetchPreviewOptions.Normal, bool cacheThumbnail = false)
Parameters
Search context used to fetch the preview.
Indicates the size of the desired preview.
Indicates the options used to fetch various preview types.
Indicates if the preview thumbnail should be cached for next time.
Returns
Type | Description |
|---|---|
| Texture2D | Returns the generated preview 2D texture. |