GetAssetPreviewFromPath
Returns a preview texture to be used in the search view.
읽는 시간 1분최근 업데이트: 한 달 전
Definition
- Type: Method
- Namespace: UnityEditor.Search
- Assembly: UnityEditor
GetAssetPreviewFromPath(string, FetchPreviewOptions)
Returns a preview texture to be used in the search view.
public static Texture2D GetAssetPreviewFromPath(string path, FetchPreviewOptions previewOptions)
Parameters
Returns
Type | Description |
|---|---|
| Texture2D | Preview 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
Asset path.
Additional preview options.
Request size of the preview. This is useful for the DisplayMode.Grid view.
Returns
Type | Description |
|---|---|
| Texture2D | Preview 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
Asset path.
Request size of the preview. This is useful for the DisplayMode.Grid view.
Additional preview options.
Returns
Type | Description |
|---|---|
| Texture2D | Preview texture. |