Skip to content

[Unity] Display the Text Without Canvas

I always use Text component to display text in Unity. But after a while, I discovered that the default Text component was created under the Canvas component, and the text moved with the camera position, which is more suitable for displaying UI text.

So, what if I have a requirement to display the merchant's name?

The answer is simple: Create an empty object under the game object whose name you want to display, and add the TextMeshPro component.


Example

I created a businessman, and created an empty object Name under the businessman object, attached a TextMeshPro component, and labeled Businessman.


Then I demonstrate it.

As you can see, the name of the businessman is display on the top of the businessman game object and will not move with the screen.


References


Read More

Tags:

2 thoughts on “[Unity] Display the Text Without Canvas”

    1. The 3D Text does the same, it’s just how it shows up in the editor, you can clear it up by messing around, he’s only showing you how it’s done, not how to perfect it! 😛

Leave a Reply