Currently I am using the following code:
//if (IsCanvasValid_WarnIfNot())
{
UFont* Font = HUDFonts[fontID];
Canvas->TextSize(Font ? Font : GEngine->GetMediumFont(), txt, w, h, scale, scale);
}
However, it returns the wrong text size. I’ve read that this should only be accessed from the DrawHUD() function. Is it possible to instantly calculate the size outside of the DrawHUD() function? I would like to call this function from C# by posting the parameters and return the size directly.
Any ideas?