GetPreview(SearchContext, Vector2, FetchPreviewOptions, bool)
Gets the search item preview if available, otherwise the preview is fetched at this time.
Read time 1 minuteLast updated 12 days ago
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. |