Hey, so now I’m having a trouble. How can I draw a text on the screen through c++? Like drawing a “YOLO” text with black color at anywhere using the “random” font. (I am kinda a newbie in c++, I only good at c# and java)
FText SomeText = “Something…”;
FLinearColor TheFontColour = FLinearColor(1.0f, 1.0f, 1.0f);
FCanvasTextItem NewText(FVector2D(XPosition, YPosition), SomeText, TheFont, TheFontColour);
//Text Scale
NewText.Scale.Set(ScaleX, ScaleY);
//Draw
Canvas->DrawItem(NewText);
There is also a Wiki tutorial on it here.
THANK YOU!!!
At UE 4.19 - FText SomeText = FText::FromString(“Something…”);