Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

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.

cacheThumbnail

Indicates if the preview thumbnail should be cached for next time.

Returns

Type

Description

Texture2DReturns the generated preview 2D texture.