Ink Integration - cannot play sequence while barking from ink

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
nehvaleem
Posts: 93
Joined: Tue Sep 10, 2019 4:52 am

Ink Integration - cannot play sequence while barking from ink

Post by nehvaleem »

Hi,
I think that there may be a bug in the Ink Integration package. I am trying to run a sequencer command from a bark that comes from the ink conversation.

Code: Select all

NullReferenceException: Object reference not set to an instance of an object
PixelCrushers.DialogueSystem.InkSupport.DialogueSystemInkIntegration+<PlaySequenceAtEndOfFrame>d__61.MoveNext () (at Assets/Plugins/Pixel Crushers/Dialogue System/Third Party Support/Ink Support/Scripts/DialogueSystemInkIntegration.cs:505)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <0e343a50133148b6b99f9915103a7af3>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

The bark itself (without sequence) plays without any issues.
nehvaleem
Posts: 93
Joined: Tue Sep 10, 2019 4:52 am

Re: Ink Integration - cannot play sequence while barking from ink

Post by nehvaleem »

quick & probably dirty workaround is someone is interested could look like this:

DialogueSystemInkIntegration:501

PlaySequenceAtEndOfFrame

Code: Select all

if (DialogueManager.currentConversationState?.subtitle?.speakerInfo != null && DialogueManager.currentConversationState?.subtitle?.listenerInfo != null)
            {
                DialogueManager.PlaySequence(sequence,
                    DialogueManager.currentConversationState.subtitle.speakerInfo.transform,
                    DialogueManager.currentConversationState.subtitle.listenerInfo.transform);    
            }
            else
            {
                DialogueManager.PlaySequence(sequence);    
            }
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Ink Integration - cannot play sequence while barking from ink

Post by Tony Li »

Thanks for identifying that. I've implemented a similar fix in the integration in the next version. It's also on the Extras page.
Post Reply