If a TextureRenderTarget2D is used in a code class, the build of the project will fail with an error stating that the UTextureRenderTarget base class is undefined. The line #include "Engine/TextureRenderTarget.h" needs to be added to TextureRenderTarget2D.h in order to build the project.
virtual void DrawHUD() override; UTextureRenderTarget2D* MiniMapTex;
#include "CanvasItem.h"
void AMyHUD::DrawHUD()
{
Super::DrawHUD();
FVector2D MiniMapDrawPosition(0, 0);
FCanvasTileItem MiniMapTileItem(MiniMapDrawPosition, MiniMapTex->Resource, FLinearColor::White);
}
RESULTS:
The build fails with the following error:
1>D:\Main-Builds\UE4\Engine\Source\Runtime\Engine\Classes\Engine/TextureRenderTarget2D.h(17): error C2504: 'UTextureRenderTarget' : base class undefined
EXPECTED:
The build completes successfully.
how to recover UE-5.1.1 to UE-5.1 ?
UE-170920 still exists in 5.1.1?
How to have a sound cue follow a PlayerController along a spline?
I am not able to find world outliner how to enable it?
How to capture a screen Use CineCameraComponent without SceneComponent2d
How can i modify the param name in EQS node
My UE5-0 Directional Light is too small and not real ,please tell me how to fix it thanks
Bullet replication problem. The players sees each other but does not see the bullet
When I open UE4 4.24.3 it appears that. Does anyone know how to solve?
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Foundation - Core |
---|---|
Target Fix | 4.6 |
Created | Nov 5, 2014 |
---|---|
Resolved | Nov 12, 2014 |
Updated | Feb 5, 2017 |