Page 1 of 1

Ink Integration - cannot play sequence while barking from ink

Posted: Sat Nov 28, 2020 5:28 am
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.

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

Posted: Sat Nov 28, 2020 5:36 am
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);    
            }

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

Posted: Sat Nov 28, 2020 8:06 am
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.