Method GetAssetPreview
GetAssetPreview(Object, Action<Texture>)
Tries to get an AssetPreview for an asset.
Declaration
public static IEnumerator GetAssetPreview(Object asset, Action<Texture> callback)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | asset | The asset for which to get a preview. |
| Action<Texture> | callback | Called with the preview texture as an argument, when it becomes available. |
Returns
| Type | Description |
|---|---|
| IEnumerator | An enumerator used to tick the coroutine. |
Remarks
If a preview is not immediately available, this function waits until IsLoadingAssetPreview(int) changes to false. If the preview has still not loaded, the function uses GetMiniThumbnail instead.