I’m following this tutorial/book “Learning C++ by Creating Games with UE4”, and there’s a problem with the HUD. In the Blueprints it gives me the option to choose a font, but there are no fonts to choose from (not even roboto). In the .cpp file its just
void AMyHUD::DrawHUD()
{
//call superclass DrawHUD() function first
Super::DrawHUD();
// then proceed to draw your stuff.
//Draw Lines
DrawLine(200, 300, 400, 500, FLinearColor::Blue);
//Draw Text
DrawText("Greetings from Unreal!", FColor::White , 0, 0, hudFont, 1, true);
}
and in the .h file is
UCLASS()
class GOLDENEGG_API AMyHUD : public AHUD
{
GENERATED_BODY()
public:
//The font used to render the text in HUD
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "HUDFont")
UFont* hudFont;
//Function to draw to HUD
virtual void DrawHUD() override;
};