Download

Thumbnail Renderer

Does someone know how to use the Thumbnail rendering system to get a Thumbnail in the content browser. The class which need the thumbnail would be simple, something like that :


UCLASS(abstract, Blueprintable, BlueprintType)
class UDE_InventoryItem : public UObject
{
	GENERATED_UCLASS_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Item)
	class UTexture2D* Sprite;
	
};

What i’d you like is the texture to be used as the thumbnail. I did check the Texture and Texture2D class and some ThumbnailRenderer classes but i still dont get it :confused:

Thanks !

Hi Elzean,

You need to create a thumbnail renderer for your custom asset type. Have a look at something like [FONT=Courier New]UTextureThumbnailRenderer for an example (you may just be able to subclass that and use it directly, calling the Super Draw passing in your texture as the Object).

You’ll also need to register your thumbnail renderer during plugin initialization or game startup in a game editor module:


UThumbnailManager::Get().RegisterCustomRenderer(UDE_InventoryItem::StaticClass(), UYourThumbnailRenderer::StaticClass());

Cheers,
Michael Noland