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