Double subtitles when switching conversation on first run.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Nosy
Posts: 3
Joined: Thu Nov 28, 2024 5:04 pm

Double subtitles when switching conversation on first run.

Post by Nosy »

So when I start a conversation for the very first time my responses generate double subtitles and the reaction are also double see screenshot:
Screenshot 2024-11-28 231129.png
Screenshot 2024-11-28 231129.png (36.3 KiB) Viewed 1913 times
It keeps doing this even if I close and resume the conversation or another conversation.

Now here is the weird part.
If I restart the game and resume the conversation it works as expected.
It is on the first start-up when this happens and after closing the game it goes back to normal (Without showing the last conversation entries because I am guessing it became bugged).
Also for some reason the bubbles instantiate empty on conversation start as seen on the screenshot above, don't know if this is related.

I start conversations from a message list using:

Code: Select all

dialogueUIInstance.ResumeConversation(user);
I am not calling it anywhere else and after debugging for awhile I reached a dead end.
Settings screenshots bellow:

Screenshot 2024-11-28 231815.png
Screenshot 2024-11-28 231815.png (143.53 KiB) Viewed 1913 times
Screenshot 2024-11-28 231856.png
Screenshot 2024-11-28 231856.png (43.76 KiB) Viewed 1913 times
Screenshot 2024-11-28 231928.png
Screenshot 2024-11-28 231928.png (169.45 KiB) Viewed 1913 times
Screenshot 2024-11-28 232115.png
Screenshot 2024-11-28 232115.png (114.91 KiB) Viewed 1913 times
Loving the asset and have been able to solve almost all my problems using this board and the documentation but I really reached a dead end with this problem.
I really hope you ran into this before and can help me solve this.
User avatar
Tony Li
Posts: 23259
Joined: Thu Jul 18, 2013 1:27 pm

Re: Double subtitles when switching conversation on first run.

Post by Tony Li »

Hi,

If you temporarily set the Dialogue Manager's Other Settings > Debug Level to Info and reproduce the issue, does it provide any clues? For example, do you see two lines like "Dialogue System: Starting conversation..." instead of just one of those?

If that doesn't help, can you send a reproduction project to tony (at) pixelcrushers.com? If so, please include the steps I should follow to reproduce the issue.
Nosy
Posts: 3
Joined: Thu Nov 28, 2024 5:04 pm

Re: Double subtitles when switching conversation on first run.

Post by Nosy »

Hey thanks for the fast reply man, appreciate it!

I set debug to info and started playing around and at one point even saw 4 bubbles. Saw that the chat was still being called once so the problem was not that it was starting the conversation multiple times.
But more so that the conversation was not being closed properly.
I was using Close in PixelCrushers.DialogueSystem.Wrappers.SMSDialogueUI to close the UI but never closed the actual conversation. That still does not explain why it stopped happening when restarting the game but the problem is solved.

TLDR:
Did not close conversation properly.
PixelCrushers.DialogueSystem.Wrappers.SMSDialogueUI Close was not sufficient.
Solved by adding DialogueManager.StopConversation();

Hope this helps someone else in the future.
Thank you Tony.
User avatar
Tony Li
Posts: 23259
Joined: Thu Jul 18, 2013 1:27 pm

Re: Double subtitles when switching conversation on first run.

Post by Tony Li »

Thanks for summarizing your solution!

A little side note: Since you're using SMSDialogueUI, if you want to save the state of an active conversation so that SMSDialogueUI.ResumeConversation() will restore that state, make sure to call SMSDialogueUI.SaveConversation() before calling DialogueManager.StopConversation().
Nosy
Posts: 3
Joined: Thu Nov 28, 2024 5:04 pm

Re: Double subtitles when switching conversation on first run.

Post by Nosy »

Yes I noticed it was not being saved afterwards and added it.
Works like a charm!

8-)
Post Reply