기술 자료

Unity Engine

Unity Engine

GetAssetPreviewFromPath

Returns a preview texture to be used in the search view.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

GetAssetPreviewFromPath(string, FetchPreviewOptions)

Returns a preview texture to be used in the search view.
public static Texture2D GetAssetPreviewFromPath(string path, FetchPreviewOptions previewOptions)

Parameters

path

Asset path.

previewOptions

Additional preview options.

Returns

Type

Description

Texture2DPreview texture.

Remarks

GetAssetPreviewFromPath(SearchContext, string, FetchPreviewOptions, Vector2)

Returns a preview texture to be used in the search view.
public static Texture2D GetAssetPreviewFromPath(SearchContext context, string path, FetchPreviewOptions previewOptions, Vector2 previewSize = default)

Parameters


path

Asset path.

previewOptions

Additional preview options.

previewSize

Request size of the preview. This is useful for the DisplayMode.Grid view.

Returns

Type

Description

Texture2DPreview texture.

Remarks

GetAssetPreviewFromPath(string, Vector2, FetchPreviewOptions)

Returns a preview texture to be used in the search view.
public static Texture2D GetAssetPreviewFromPath(string path, Vector2 previewSize, FetchPreviewOptions previewOptions)

Parameters

path

Asset path.

previewSize

Request size of the preview. This is useful for the DisplayMode.Grid view.

previewOptions

Additional preview options.

Returns

Type

Description

Texture2DPreview texture.

Remarks