The Second Conversation's First DialogueText wouled run 2 times in TextMeshProTypewriterEffect>().onEnd

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
shortlin
Posts: 73
Joined: Wed Jun 03, 2020 1:52 am

The Second Conversation's First DialogueText wouled run 2 times in TextMeshProTypewriterEffect>().onEnd

Post by shortlin »

I wrote a auto play function,so I added the OnContinueConversation() in the TextMeshProTypewriterEffect>().onEnd.

I had a problem is why when I played the second conversation's first dialogueText, it would run two times in TextMeshProTypewriterEffect>().onEnd.

There is no problem in the vision(means the dialoueText player just see one time,but script use debug.Log in the end would see two times).

The first time showed when the start node begin,I used Debug.Log(DialogueManager.currentConversationState.subtitle.dialogueEntry.currentDialogueText); ,it would show the dilaougueText when the Start Node run but the dialogueText is not played end.(and then the text ended,the debug.Log will show,so it run two times)

and this problem just after second conversation .The first conversation would not happend.

And it also just happened in the first node'(Means next the START's node).

I treied to add a count to skip the first conversation end.but I think it is not a good way.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: The Second Conversation's First DialogueText wouled run 2 times in TextMeshProTypewriterEffect>().onEnd

Post by Tony Li »

Hi,

Does the end of the first conversation link to the <START> node of the second conversation? If so, can you link the end of the first conversation to the next node of the second conversation (not the <START> node)?
shortlin
Posts: 73
Joined: Wed Jun 03, 2020 1:52 am

Re: The Second Conversation's First DialogueText wouled run 2 times in TextMeshProTypewriterEffect>().onEnd

Post by shortlin »

No
The two coversations is using DialogueManager.StartConversation(Title_Name) in different time. and thy are not linked it. I So I Said after two conversation. means it would happen in the the third conversation.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: The Second Conversation's First DialogueText wouled run 2 times in TextMeshProTypewriterEffect>().onEnd

Post by Tony Li »

Can you please send a reproduction project or reproduction steps to tony (at) pixelcrushers.com? (If it's not a problem and you don't want to take the time to send a reproduction project, that's fine. Don't feel obligated to send it.)
shortlin
Posts: 73
Joined: Wed Jun 03, 2020 1:52 am

Re: The Second Conversation's First DialogueText wouled run 2 times in TextMeshProTypewriterEffect>().onEnd

Post by shortlin »

Sorry I forgot I had ask the question.
Finally I used <TextMeshProTypewriterEffect>().isPlaying==false after 0.1 seconds to judge that time could auto play.
But It was still not a good way.So Maybe I would take sometimes to reappear the problem in a small project and sent it.
Post Reply