Skip to content

ImagePreviewHandler

ClassAssetInventoryAssetInventory.Editor
public static class ImagePreviewHandler

Image preview generation with fast resize shortcuts. Extracted from PreviewManager for better separation of concerns.

TryCreateImagePreview(AssetInfo, string, string, int, Action, Action)

Section titled “TryCreateImagePreview(AssetInfo, string, string, int, Action, Action)”
public static bool TryCreateImagePreview(AssetInfo info, string sourcePath, string previewFile, int previewSize, Action onCreated = null, Action<PreviewRequest> onDone = null)

Try to create or copy image preview using shortcuts (resize or original) Returns true if handled successfully, false if Unity import pipeline should be used

Parameters

Name Type Description
info AssetInventory.AssetInfo
sourcePath System.String
previewFile System.String
previewSize System.Int32
onCreated System.Action
onDone System.Action{AssetInventory.PreviewRequest}

Returns

System.Boolean — No return description is available.