I want to get a thumbnail of any asset. I use function ThumbnailTools::RenderThumbnail to do this.
For example:
ThumbnailTools::EThumbnailTextureFlushMode::Type TextureFlushMode = ThumbnailTools::EThumbnailTextureFlushMode::NeverFlush;
FObjectThumbnail ObjectThumbnail;
ThumbnailTools::RenderThumbnail(
SelectedAssets[0].GetAsset(),
128, 256,
TextureFlushMode, NULL,
&ObjectThumbnail
);
The image data of the thumbnail can be get from the ObjectThumbnail.
But it is surprised that some obtained image data are correct for some assets (e.g. mesh asset) and some ones are all zeros for some assets (e.g. Physics asset).
So, my problem is how to obtain a thumbnail for any asset.