Page 1 of 1

Overtone error with Continute() command

Posted: Wed May 22, 2024 12:39 am
by nathanj
Hi Tony,

I started getting this error

Code: Select all

MissingReferenceException: The object of type 'SequencerCommandOvertone' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UnityEngine.MonoBehaviour.Invoke (System.String methodName, System.Single time) (at <228a75ed9d5b4a658c89f48527e7e2e0>:0)
PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandOvertone.OnGeneratedVoice (UnityEngine.AudioClip clip) (at Assets/Pixel Crushers/Dialogue System Addon for OpenAI/Overtone Integration/Scripts/SequencerCommandOvertone.cs:60)
PixelCrushers.DialogueSystem.OpenAIAddon.Overtone.OvertoneInterface.Speak (System.String text, LeastSquares.Overtone.TTSVoiceNative voice, System.Action`1[T] callback) (at Assets/Pixel Crushers/Dialogue System Addon for OpenAI/Overtone Integration/Scripts/OvertoneInterface.cs:47)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <4b234520e36749be9cf6b053d911690f>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <228a75ed9d5b4a658c89f48527e7e2e0>:0)
UnityEngine.UnitySynchronizationContext.Exec () (at <228a75ed9d5b4a658c89f48527e7e2e0>:0)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at <228a75ed9d5b4a658c89f48527e7e2e0>:0)
when I added a Continue() sequence command to my dialogue node. I added this command so that the response buttons would appear instantly - my dialogue node's sequence has these two commands

Code: Select all

Overtone(); Continue()
It doesn't seem to be affecting anything, just get that error message. Is it ok to ignore? Not a big fan of error messages but in this case I don't see it having any impact on the actual game play.

Thank you,
Nathan

Re: Overtone error with Continute() command

Posted: Wed May 22, 2024 8:48 am
by Tony Li
Hi Nathan,

Thanks for letting me know about this. I'll make sure it's handled in the next update.

The issue is that Overtone() does a call out to the Overtone API and waits for a response. The Continue() command immediately ends the current subtitle, killing the Overtone() sequencer command call, so the response from Overtone has nowhere to go.

You could try changing it to:

Code: Select all

Overtone()->Message(Spoke);
Continue()@Message(Spoke)
This will continue once the Overtone() command is done.

Re: Overtone error with Continute() command

Posted: Wed May 22, 2024 7:23 pm
by nathanj
OK, That kind of worked for resolving the error message but I was hoping to have the response buttons appear instantly. Would it be ok just to ignore the error message for now?

With your suggestion it works the same as if there were no Continue() command.

Thank you
Nathan

Re: Overtone error with Continute() command

Posted: Wed May 22, 2024 7:46 pm
by Tony Li
Yes, I think it's okay to ignore the error message until you update to the next (fixed) version.

Re: Overtone error with Continute() command

Posted: Wed May 22, 2024 7:50 pm
by nathanj
OK, Thanks again for everything, Tony