So I’ve a custom hud class and my UI guy has asked me about using Materials outside of Slate. I implemented a component to render them, similar to my standard texture component, but all I got was a black square on the screen. I went back to basics, and created a FCanvasTileItem during the DrawHUD() method… still get a black square.
FCanvasTileItem cmTest = FCanvasTileItem(
FVector2D( 500.f, 200.f ),
mTest->GetRenderProxy( false, false ),
FVector2D( 256.f, 256.f )
);
oCanvas->DrawItem( cmTest );
Is the code I’m using. mTest links to a material, fetched in the constructor and stored in a UPROPERTY(), which renders perfectly fine in the material editor (with no parameters required - though it does have some (I also tried a new material, which just fed a constant vector in to the base colour pin, without success.))
I’ve tried setting the Color to FColor::White and various blend modes. Nothing seems to work.
Has anyone have any luck with it?