StandardUIResponseButton with textmeshpro

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
joeylu
Posts: 111
Joined: Sun May 17, 2020 1:07 pm

StandardUIResponseButton with textmeshpro

Post by joeylu »

Hi Tony, In your template, a StandardUIResponseButton uses Unity Button/Text UI to display text, it working perfectly
However, if I remove the text UI component and replaced with text mesh pro component, keep the same "text" name under the button, the menu formattedText.text is not showing
Currently I modified StandardUIMenuPanel and manually assign the formattedText.text to the target button>textmeshpro
Just curious if there's a better way instead hard code it, tks
User avatar
Tony Li
Posts: 21055
Joined: Thu Jul 18, 2013 1:27 pm

Re: StandardUIResponseButton with textmeshpro

Post by Tony Li »

Hi,

The Dialogue System has native TextMeshPro (TMP) support. First enable TMP Support. Then unassign the UI Text field (if it's still assigned). The Label field should now show slots of UI Text or TextMeshProUGUI. Assign your TMP element to the TextMeshProUGUI slot.
joeylu
Posts: 111
Joined: Sun May 17, 2020 1:07 pm

Re: StandardUIResponseButton with textmeshpro

Post by joeylu »

got it, forgot to enable the textmeshpro from the tools menu, tks
User avatar
Tony Li
Posts: 21055
Joined: Thu Jul 18, 2013 1:27 pm

Re: StandardUIResponseButton with textmeshpro

Post by Tony Li »

Glad to help!
Post Reply