Unable To Add Text Mesh Pro Text In 'Game' Object

If I am creating a Text Mesh Pro text, it is not getting in the Text Component of the Game object.

How can we add font in our Story Text.

Hi,

I don’t know what you mean by “it is not getting in the Text Component of the Game object” but this is how you can change the font in the Text Mesh Pro component: There is a font field. Assign a font to that field.

If you want to use a different font than the default font, please follow this instruction:
https://learn.unity.com/tutorial/textmesh-pro-font-asset-creation

Did this help?


See also:

In canvas we have a created a UI --> Text named ‘Story Text’ which we are using to show our story text (see hierarchy in first image). Then we have assigned that UI to text component of object named ‘Game’ (see inspector in second image).

If I am creating a UI --> Text - TextMeshPro then I am unable to assign it to the text component of the object ‘Game’.

How can we do that?? Please assist.

Did you install the TextMeshPro package and were you able to use the TextMeshProUGUI component in the Inspector? If so, add using TMPro; at the top of your code and replace the Text type with TextMeshProUGUI in your code. Then you should be able to reference the component in the Inspector and to make your AdventureGame display the story text.

Thanks!!

This solved the problem.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms