Table of content:
- What is DAT plugin?
- Where can I get this plugin?
- Where can I see it in action?
- How to set a variable to be a Data Assets thumbnail?
- How to set that variable using only BP?
- Which assets can be used as a thumbnail?
- What if I set multiple variables to be a thumbnail?
- What if my thumbnail asset is inside of a struct?
- How to setup default Data Assets color and icon?
- What if thumbnail don't want to change?
- How can I get support?
- Special thanks
This plugin enhances the Content Browser by allowing you to set custom thumbnail images and colors for your Data Assets, making them easier to organize and identify.
It's ideal for games with hundreds or thousands of Data Assets like items, abilities, or weapons.
It helps to organize your assets visually.
Before Data Asset Thumbnails Plugin
After Data Assets Thumbnails Plugin
From Fab: https://www.fab.com/listings/239dd3f5-602e-4453-b161-c06191659335
On YouTube: https://www.youtube.com/watch?v=qIrqWKTJ_nE
Simply add Thumbnail
meta tag to the property you want to use as a thumbnail.
#pragma once
#include "CoreMinimal.h"
#include "Engine/DataAsset.h"
#include "MyDataAsset.generated.h"
UCLASS(BlueprintType, Blueprintable)
class MYPROJECT_API UMyDataAsset : public UDataAsset
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadOnly, meta = (Thumbnail))
TObjectPtr<class UTexture2D> Icon;
};
If you define a variable inside of the PrimaryDataAsset
and it is one of the supported type the Is Thumbnail
checkbox can be selected to make that variable a thumbnail.
UTexture2D
hard and soft reference- Any
UMaterialInterface
child (UMaterial
,UMaterialInstance
, etc) hard and soft referece FSlateBrush
The first one found will be used as a thumbnail.
Unfortunatelly we can't set meta tag inside of a struct, but there is a second way of defining which asset should be used as a thumbnail and this is by using IDataAssetWithThumbnail
and by overriding GetAssetToRender_Implementation
function.
#pragma once
#include "Engine/DataAsset.h"
#include "IDataAssetWithThumbnail.h"
#include "DATUtils.h"
#include "MyDataAsset.generated.h"
USTRUCT(BlueprintType)
struct FIconStruct
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TObjectPtr<class UTexture2D> Icon;
};
UCLASS(BlueprintType, Blueprintable)
class MYPROJECT_API UMyDataAsset : public UDataAsset, public IDataAssetWithThumbnail
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite)
FIconStruct IconStruct;
UObject* GetAssetToRender_Implementation() const override
{
return FDATUtils::GetRenderObjectFromObject(IconStruct.Icon);
}
};
Will it work in BP too?
Yes it will!
Go to Project Settings -> Plugins -> Data Assets Thumbnails
and fill up the Global Overrides
Remember that in order to render a thumbnail an asset must be saved and compiled. Sometimes you need to go out from a directory and enter again.
If everything fails, you can try to refresh a thumbnail, by right clicking the asset and selecting Asset Actions -> Refresh Thumbnails
.
You can also refresh multiple thumbnails by right-click on a directory and select Refresh Thumbnails
.
This page consists all of the knowledge you should have to use this plugin.
However, if you have any questions or bug reports you can:
- Add an Issue to this repository
- Ask on Forum page
- Ask me via e-mail: zompi2@gmail.com
I want to say thanks to Monika, for everlasting support and that she always believes in me, and to Patrick, for always encouraging me to get my shit done :)