Using RenderUtils functions in a c++ plugin

I’m writing a plugin of some code I already have working as part of my main project. In my working code I write

FCanvasTileItem BlackBox = FCanvasTileItem(FVector2D::ZeroVector, GBlackTexture, CanvasSize, FLinearColor(1.0f, 1.0f, 1.0f));
	Canvas->DrawItem(BlackBox);

When I add that code to my plugin I get

1>     Creating library C:\Users\stuart\Documents\Unreal Projects\MinimapPlugin\Intermediate\Build\Win64\MinimapPluginEditor\DebugGame\Plugins\Dynamic\UE4Editor-Minimap-Win64-DebugGame.lib and object C:\Users\stuart\Documents\Unreal Projects\MinimapPlugin\Intermediate\Build\Win64\MinimapPluginEditor\DebugGame\Plugins\Dynamic\UE4Editor-Minimap-Win64-DebugGame.exp
1>MinimapVolume.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class FTexture * GBlackTexture" (__imp_?GBlackTexture@@3PEAVFTexture@@EA)
1>C:\Users\stuart\Documents\Unreal Projects\MinimapPlugin\Plugins\Developer\Minimap\Binaries\Win64\UE4Editor-Minimap-Win64-DebugGame.dll : fatal error LNK1120: 1 unresolved externals

How do I add the relevant code/libraries to allow the use of RenderUtils.

Check in your Plugin.Build.cs and that you have “RenderCore” in your PublicDependencyModuleNames.

That was it. Added it and it all compiled :slight_smile: Thanks