I am trying to create a custom thumbnail renderer for one of our data assets by inheriting from UTextureThumbnailRenderer. The renderer uses a texture inside the data asset (these textures are in-engine) to create the required thumbnail. I am registering this thumbnail on post engine load. The data asset thumbnails are initially blank until they are opened or saved, which makes sense given that the data asset has to be loaded to access the texture inside. My expectation was that the engine would cache these thumbnails after this initial save, and the thumbnails should render correctly on subsequent engine loads. However, this is not the case and many of those data assets (not all) still render blank thumbnails. I went through a few other thumbnail renderer implementations in the engine, and it seems a bit unclear what the correct method is to implement a custom thumbnail renderer:
1) ControlRig seems to use the “CustomThumbnailTagName” metadata to indicate which thumbnail to render (ControlRigBlueprint.h, line 198)
2) Niagara seems to set up Thumbnail caching in the asset factory (NiagaraSystemFactoryNew.cpp, line 120)
My question, therefore, is: What is the correct way to implement a custom thumbnail renderer for our use case, and where do we implement caching this thumbnail? If not caching, can you suggest another way to cleanly access the texture inside the data asset without reducing editor performance?