GameplayDebugger font size
FGameplayDebuggerCategory.DrawData() uses FGameplayDebuggerCanvasContext to draw debug data to the screen. It has pointer to UFont. How can I change the font size?
GameplayDebugger category uses
First would be to edit the font file used by the small font. Second, is to change the hardcoded value to a larger font. Third way is to create a method inside
No matter which method you choose, first you need a font file with the size you want. Fonts returned by the
There isn't really a large font to choose from. Each of the
You can duplicate the font you want (I recommend Roboto) to any folder inside your Content folder. Open it and change font size. Open Project Settings -> General Settings -> Fonts and set the font. You can also do it by changing the DefaultEngine.ini (in your game repository):
Here I created Fonts/ in the Content folder and put my RobotoLarge font file there.
If you don't want to edit engine code, you can set the small font to the one you created and it should work.
If you want the canvas context to use large font by default, change the font in
and recompile the engine. UBT should only recompile the GameplayDebugger module.
You can also create an API to change the font at runtime.
Add to the declaration of
and the definition in the cpp file:
and recompile the engine.
In your override of the
Recompile the game. When you open GameplayDebugger, the header will still use the default font but your custom debug data should be in large font.
This applies when overriding Actor's
You can change font used for displaying text on canvas by getting the pre-set font from
Create your own font file and set in the Project Settings as explained above. Restart editor. Run the game,
Follow this question
Once you sign in you will be able to subscribe for any updates here