Page 1 of 1
Can't Assign Textmesh Pro Object to Templated Dialogue UI Script
Posted: Sat Apr 25, 2020 12:44 pm
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!
Re: Can't Assign Textmesh Pro Object to Templated Dialogue UI Script
Posted: Sat Apr 25, 2020 3:00 pm
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.
Re: Can't Assign Textmesh Pro Object to Templated Dialogue UI Script
Posted: Sat Apr 25, 2020 10:38 pm
by onyx
WOW
Thanks Tony, you are amazing!
Re: Can't Assign Textmesh Pro Object to Templated Dialogue UI Script
Posted: Sun Apr 26, 2020 6:52 am
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!
Re: Can't Assign Textmesh Pro Object to Templated Dialogue UI Script
Posted: Sun Apr 26, 2020 8:34 am
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.
Re: Can't Assign Textmesh Pro Object to Templated Dialogue UI Script
Posted: Sun Apr 26, 2020 11:46 am
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!
Re: Can't Assign Textmesh Pro Object to Templated Dialogue UI Script
Posted: Sun Apr 26, 2020 2:06 pm
by Tony Li
Happy to help!