Can't Assign Textmesh Pro Object to Templated Dialogue UI Script

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
onyx
Posts: 7
Joined: Wed Mar 11, 2020 12:52 am

Can't Assign Textmesh Pro Object to Templated Dialogue UI Script

Post by onyx »

Hi Tony:

I'm using a Subsurface Circular-like dialogue UI bases on this extra on the website
https://www.pixelcrushers.com/download/7868/
I made some custom changes, and it works well. However, when I replace the subtitle's regular UI Text with Textmesh Pro's text, I found that I couldn't drag this Textmesh gameobject into its corresponding field of this templated dialogue UI script. It seems to only accept "Text" type.
And the result is that the Textmesh Pro and the Typewriter effect runs normally, but the dialogue in the database cannot be output. It just keep outputting the default text.

And here is my question: Is there any way to make the corresponding field in the templated UI script to accept "Textmesh Pro Text" type?
In addition, I have followed the TextMesh Pro Support steps, but this script looks really different from the documentation. (Honestly, I don't quite understand how this script works...)

Thanks a lot!
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Can't Assign Textmesh Pro Object to Templated Dialogue UI Script

Post by Tony Li »

Hi,

I just updated the subsurface similar example. Here's a direct link to the latest:

SubsurfaceSimilar_2020-04-26.unitypackage
(EDIT: Updated to support continue buttons.)

That subsurface similar example was made a long time ago and uses a deprecated UI that doesn't support TextMesh Pro. If you use the latest version (linked above), open the Dialogue System's Welcome window (menu item Tools > Pixel Crushers > Dialogue System > Welcome). Tick the TextMesh Pro checkbox.

Then import and open the scene. As you unassign each text element (NPC Text, PC Text, and Response Text), the Inspector will reveal a slot where you can assign a TextMesh Pro UGUI component.
onyx
Posts: 7
Joined: Wed Mar 11, 2020 12:52 am

Re: Can't Assign Textmesh Pro Object to Templated Dialogue UI Script

Post by onyx »

WOW :o Thanks Tony, you are amazing!
onyx
Posts: 7
Joined: Wed Mar 11, 2020 12:52 am

Re: Can't Assign Textmesh Pro Object to Templated Dialogue UI Script

Post by onyx »

Tony Li wrote: Sat Apr 25, 2020 3:00 pm Hi,

I just updated the subsurface similar example. Here's a direct link to the latest:

SubsurfaceSimilar_2020-04-25.unitypackage

That subsurface similar example was made a long time ago and uses a deprecated UI that doesn't support TextMesh Pro. If you use the latest version (linked above), open the Dialogue System's Welcome window (menu item Tools > Pixel Crushers > Dialogue System > Welcome). Tick the TextMesh Pro checkbox.

Then import and open the scene. As you unassign each text element (NPC Text, PC Text, and Response Text), the Inspector will reveal a slot where you can assign a TextMesh Pro UGUI component.
Thanks for the help! This new version works all fine, and now it can accept Textmesh pro text.
But the continue button seems to have some problems. I've set the script up based on the Basic Standard UI example, and set some continue buttons. When it runs, the continue button is not displayed, it also shows been disabled in Hierarchy. The conversation just can not going forward.
I also tried to add continue button in the example scene, and it won't work too.
I don't know if the problem is in the script or just my setting goes wrong, like is there any parent requirements of the continue button. Would you like to check it?

Thanks again!
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Can't Assign Textmesh Pro Object to Templated Dialogue UI Script

Post by Tony Li »

Hi,

I just updated the link in my previous reply to support continue buttons and also added a copy of the scene that has continue buttons.
onyx
Posts: 7
Joined: Wed Mar 11, 2020 12:52 am

Re: Can't Assign Textmesh Pro Object to Templated Dialogue UI Script

Post by onyx »

Tony Li wrote: Sun Apr 26, 2020 8:34 am Hi,

I just updated the link in my previous reply to support continue buttons and also added a copy of the scene that has continue buttons.
Now it works perfectly. Thanks for the generous help! :D
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Can't Assign Textmesh Pro Object to Templated Dialogue UI Script

Post by Tony Li »

Happy to help!
Post Reply