I am building a plugin that lets you use Slate on a RenderTarget. After alot of trial and error I found out that “RHI” was one of the modules I needed.
Now I get this error when I try to extract the render resource.
Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl FRenderResource::UpdateRHI(void)" (__imp_?UpdateRHI@FRenderResource@@QEAAXXZ) referenced in function "public: __cdecl USerialConsole::USerialConsole(class FPostConstructInitializeProperties const &)" (??0USerialConsole@@QEAA@AEBVFPostConstructInitializeProperties@@@Z) F:\PaulUser\Unreal Projects\ButtonScreen\Intermediate\ProjectFiles\SerialConsole.cpp.obj ButtonScreen
A few others after this, but thats the main one. I am sure I will find out where this module is before somone replys. What I want to know however:
A. How does the build system create Module names?
B. What tags do look for in the header files to know what objects go to those modules.
For using Widgets and Slates, you need more modules than “RHI”. One of them is “UMG”, and there’s one other I don’t remember the name of. Did you figure it out?
I follow these steps to find all the engine modules required by a plugin
Compile your plugin code, when you get a link error, it means you are missing a module.
Inspect the link error to find the missing class. In your above example, it is FRenderResource::xxx
Open github and go to unreal engine source code and search for this class. From here I found that this code resides in this path: Engine/Source/Runtime/RenderCore/Public/RenderResource.h [alternatively jump to the symbol in visual studio using Alt+Shift+S if you are using VisualAssistX]
From this you know that the code is under the RenderCore module. If in doubt, go to that location and look for a Build.cs file and grab the module name from there
Compile again and repeat if you get more link errors for other missing modules