StopConversation() bug?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
forrestuv
Posts: 64
Joined: Tue Nov 06, 2018 11:28 am

StopConversation() bug?

Post by forrestuv »

ver. 2.06
I have 4 conversations.
If I go through these conversations normally it's ok, but if I skip the first 3 using StopConversation() once I open the 4th (that starts with a response menu with 2 answers) I cannot continue conversation.
It let me click on the answer but it will go on the same response menu for ever (every click).

any idea?
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: StopConversation() bug?

Post by Tony Li »

Hi,

No immediate idea. I just set up a similar scene here, and it works correctly.

Would it be possible for you to send a reproduction example to tony (at) pixelcrushers.com?

If you open the Dialogue Editor window onto that conversation at runtime, which node is green?
forrestuv
Posts: 64
Joined: Tue Nov 06, 2018 11:28 am

Re: StopConversation() bug?

Post by forrestuv »

It stays on Start node and HideSubtitle() tries to hide Start subtitle.
The conversation that is causing the issue (when skipping it), is made of Start+2 subtitles performed both by Actor (no responses here).

I bet it's something related to callbacks not cleared 100% on StopConversation()
can u tell me where's the code that get the next Node?I will take a look there.

Every time I click an answer it does this:

Void PixelCrushers.DialogueSystem.StandardUISubtitleControls:HideSubtitle (Subtitle)+0x1
Void PixelCrushers.DialogueSystem.StandardDialogueUI:HideSubtitle (Subtitle)+0xd
Void PixelCrushers.DialogueSystem.ConversationView:FinishSubtitle ()+0x35
Void PixelCrushers.DialogueSystem.ConversationView:HandleContinueButtonClick ()+0x9
Void PixelCrushers.DialogueSystem.ConversationView:OnConversationContinue (IDialogueUI)+0xf
Void PixelCrushers.DialogueSystem.AbstractDialogueUI:OnContinueConversation ()+0x18
Void PixelCrushers.DialogueSystem.AbstractDialogueUI:OnContinue ()+0x8
Void PixelCrushers.DialogueSystem.StandardUIContinueButtonFastForward:OnFastForward ()+0x79
Void UnityEngine.Events.InvokableCall:Invoke ()+0x17
Void UnityEngine.Events.UnityEvent:Invoke ()+0x24
Void UnityEngine.UI.Button:Press ()+0x2d
Void UnityEngine.UI.Button:OnPointerClick (PointerEventData)+0x12
Void UnityEngine.EventSystems.ExecuteEvents:Execute (IPointerClickHandler, BaseEventData)+0x8
Boolean UnityEngine.EventSystems.ExecuteEvents:Execute (GameObject, BaseEventData, EventFunction`1)+0x73
Void UnityEngine.EventSystems.StandaloneInputModule:ProcessMousePress (MouseButtonEventData)+0x181
Void UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent (Int32)+0x31
Void UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent ()+0x3
Void UnityEngine.EventSystems.StandaloneInputModule:Process ()+0x72
Void UnityEngine.EventSystems.EventSystem:Update ()+0xf9
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: StopConversation() bug?

Post by Tony Li »

The Dialogue System needs to handle a lot of different cases, so a pointer to the code that gets the next node probably won't be sufficient since it's fairly complex. If you can send me a reproduction scene, or screenshots of how your conversations are set up, I can try to reproduce it here and give you an answer.

Otherwise, here is how conversations work:

1. When a conversation starts, the Dialogue System creates a ConversationController, ConversationModel, and ConversationView. (It uses the MVC architectural pattern.)

2. The ConversationController tells the ConversationView to open. The ConversationView manages the UI. It tells the UI to open.

3. The ConversationController gets the first node's state from the ConversationModel. As it moves from state to state, it gets the state info from the ConversationModel and tells the ConversationView to display it.

4. The ConversationView tells the UI to display the state. Assuming you're using the StandardDialogueUI, the UI tells a StandardUISubtitlePanel or StandardUIMenuPanel to display the state. The StandardUISubtitlePanel is responsible for managing its continue button.

5. The player's input bubbles up from the UI to the ConversationView to the ConversationController. Based on the info from the ConversationView, the ConversationController gets the next state from the ConversationModel.

6. If you abort early by calling DialogueManager.StopConversation(), it tells the ConversationController to close. This in turn tells the ConversationModel and ConversationView to close. The ConversationView tells the UI to close. The UI tells its subtitle panels and menu panels to close. The subtitle panel closes its UI elements (subtitle text, continue button, etc.).
Post Reply