How can i do Text render Unlit with custom font?

i’m new to the engine and i’m trying to learn by making a little 2d Side-Scrolling game, everything was going right until i tried to make that when the player hits a enemy the value of the damage pops up, i found that with Text render component you can make that, the problem is that i can’t find how to set it to Unlit, so that i don’t have to put a light source. I’d like to know how to use a custom font aswell.

Basically i’d like to know how to use a custom font and be Unlit on Text render component.

To make the material unlit, click the magnify glass beside the material to find it in the content browser, then copy it into your own project files (DefaultTextMaterialOpaque).
Open your copied material, change the shading model to Unlit, and disconnect VertexColor from BaseColor, and plug it into EmissiveColor instead:

To add a custom font to a Text render:

  1. Go to content browser, right click, User Interface>Font, give it a name.
  2. Open the created asset, in it’s details under Font, change Font Cache Type to be “Offline”
  3. A list will open where you can pick your font, search and select it. Pick font size 22 or so. Larger is smoother but takes more space it seems.
  4. Set Texture Page Width to 512, and Max Height to 256, then go to Asset > Re-import.
  5. Check Use Distance Field Alpha and save
  6. Click the texture in the viewport, and under Page Details scroll down to Compression Settings, change this to DistanceFieldFont(R8)

If your texture is in two or more pages you will need to set the compression for each one, so click it, then change it.

Go back to your text redner and set the font, the material doesn’t appear to matter:

][3]

1 Like

Exactly what i needed and really fast, thank you very much.