I\m trying to create a Texture to give to a SceneCaptureComponent2D.
class USceneCaptureComponent2D *sceneCaptureActor = (class USceneCaptureComponent2D *)GetWorld()->SpawnActor<USceneCaptureComponent2D>(USceneCaptureComponent2D::StaticClass());
class UTextureRenderTarget2D *renderTarget2D = (class UTextureRenderTarget2D *)NewObject<class UTextureRenderTarget2D>(sceneCaptureActor);
sceneCaptureActor->TextureTarget = renderTarget2D;
I get the following error which i do not know how to fix
-use of undefined type âUTextureRenderTarget2Dâ
-see declaration of âUTextureRenderTarget2Dâ
-see reference to function template instantiation âT *NewObject(UObject *)â being compiled
Thanks for the help