Creating Floating Combat Text For My FPS in Unity — Part 06
Oct 2, 2023
Objective: Part 06 of setting up floating combat text in Unity will look at fixing a TextMeshPro Text overlay issue.
As seen above, currently when my enemy moves behind a pillar, the damage text stays behind it and we can’t see it.
I want the player to always be able to see the text.
Luckily, this is a very simple issue to solve and it just means that we need to adjust the Shader on the Text GameObject.
Step 1 — Navigate to GameObject
Navigate your way to the Canvas GameObject you created and select the Child ‘Text’ GameObject.
Step 2 — Change Shader to Overlay
From here, click on the drop-down menu next the Shader and choose:
TextMeshPro → Distance Field Overlay