How to render a thumbnail for any asset?

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.

Hi Tony! Can you explain how do you get image data from ObjectThumbnail? As rawdata? And how to convert it to UTexture2D?

auto mydata = ObjectThumbnail.GetUncompressedImageData();
the mydata is rawdata, it can be converted to bmp file.

Yeah) I tried to do it but somehow i can’t compile ThumbnailTools::RenderThumbnail itself(( what should I include or put at PublicDependencyModuleNames?
There is my log error: https://answers.unrealengine.com/questions/468991/thumbnailtoolsrenderthumbnail-error.html