ThumbnailTools::RenderThumbnail() error

Hi guys! Just started next step in the C++ saga. I don’t have time to spend another 2 weeks to find out how another one function works so have to ask quickly and hope you can help me now…

I found a few suggestions about getting Asset Thumbnails: For ex:
https://answers.unrealengine.com/questions/62487/renderthumbnail-leads-to-fphysscene-crash.html
https://answers.unrealengine.com/questions/451594/how-to-render-a-thumbnail-for-any-asset.html (at least he says it works with Static Meshes :slight_smile: )

But why do I have “Error: Unrecognized type ‘FObjectThumbnail’ - type must be a UCLASS, USTRUCT or UENUM” even after I include ObjectThumbnail.h?

Maybe it’s better to try another way to get Thumbnails 2D Texture but I can’t find any tips for it. Thanks for any advice you can give me to solve this problem or find a way where to look in such issues. I really want to understand how to use C++ and how engine works. I suppose learning ue4C++ can’t be more difficult then FreeRToS coding for STM32))

Are you doing this for in-game code or in Editor only?

Hi Bruno! I saw the same question somewhere already) The answer is i’d prefer to get thumbnails in-game. But if it’s very hard so I accept the RenderTarget feature but I need to know how to save rendertexture. Something like this suggestion: How to render meshes to hud? - Rendering - Unreal Engine Forums

After testing with this poor class i got another error:

Error D:\Downloads\Unreal Projects…\Binaries\Win64\UE4Editor-…-3241.dll : fatal error LNK1120: ??? ??? ???: 1
Info ??? ??? D:\Downloads\Unreal Projects…\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-…-3241.lib ? ??? D:\Downloads\Unreal Projects…\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-…-3241.exp
Error MyBPFunctionLibrary.cpp.obj : error LNK2019: ??? ?? ??? ??? ??? “__declspec(dllimport) void __cdecl ThumbnailTools::RenderThumbnail(class UObject *,unsigned int,unsigned int,enum ThumbnailTools::EThumbnailTextureFlushMode::Type,class FTextureRenderTargetResource *,class FObjectThumbnail *)” (_imp?RenderThumbnail@ThumbnailTools@@YAXPEAVUObject@@IIW4Type@EThumbnailTextureFlushMode@1@PEAVFTextureRenderTargetResource@@PEAVFObjectThumbnail@@@Z) ? ??? “public: static class UTexture2D * __cdecl UMyBPFunctionLibrary::LoadTexture2D(class UObject *,bool &,int &,int &)” (?LoadTexture2D@UMyBPFunctionLibrary@@SAPEAVUTexture2D@@PEAVUObject@@AEA_NAEAH2@Z)
Error D:\Downloads\Unreal Projects…\Binaries\Win64\UE4Editor-…-7225.dll : fatal error LNK1120: ??? ??? ???: 1

#include "EngineGlobals.h"
#include "UnrealEd.h"		//for 
#include "ObjectTools.h"	       //Thumbnail?
#include "ImageUtils.h"
#include "ModuleManager.h"
#include "Runtime/ImageWrapper/Public/Interfaces/IImageWrapper.h"
#include "Runtime/ImageWrapper/Public/Interfaces/IImageWrapperModule.h"
#include "Engine/Engine.h"
#include "MyBPFunctionLibrary.h"

ThumbnailTools::RenderThumbnail(Asset, Width, Height, ThumbnailTools::EThumbnailTextureFlushMode::NeverFlush, NULL, &ObjectThumbnail);

PublicDependencyModuleNames.AddRange(new string[] { “Core”, “CoreUObject”, “Engine”, “InputCore”, “ImageWrapper”});

In Editor code this is pretty easy to do, but in shipping game I have no experience doing it; So can’t help, sorry.

Ok, how can I make it in Editor code?