SPropertyEditorAsset::ShouldDisplayThumbnail() don't check metadata of class ( UPaperSprite property don't show thumbnail in Editor )

Hello, I’ Inkey.

When I declare UPaperSprite class like

UPROPERTY(EditDefaultsOnly)
class UPaperSprite* SpritePtr;

I found that “SpritePtr” property don’t display thumbnail in Editor.

But, As we can see in UPaperSprite class declaration, “DisplayThumbnail” metadata is true.

UCLASS(BlueprintType, meta=(DisplayThumbnail = "true"))
class PAPER@D_API UPaperSprite : public UObject, .....

However, UTexture class declaration even don’t have DisplayThumbnail metadata, but always display thumbnail whenever they declared.

I finally found that in SPropertyEditorAsset::ShouldDisplayThumbnail() function has something problem.

This function only check metadata of property, but don’t check metadata of class declaration.
(It also check hard coded class type of UTexture, UStaticMesh, etc…)

I think that this function shuld check “DisplayThumbnail” metadata of class declaration.

Hi Inkey,

Thank you for pointing this issue out to us. It is intended that all assets should show a thumbnail, so this behavior is incorrect. I have entered UE-41958 to have this investigated further.

In the meantime, you can add meta=(DisplayThumbnail = "true") to the UPROPERTY for your pointer, and that will make the thumbnail appear in the Editor.

Hi
Thank you for reply.
Inkey