Page 1 of 1

Skip PC Subtitle after response not working

Posted: Wed Feb 15, 2023 9:16 pm
by Matcha
Hi Tony,

I am a Unity developer and I recently started using your Dialogue System for Unity in one of my projects. I wanted to start by saying that your plugin is fantastic and has been incredibly helpful in bringing my project to life.

However, I'm having an issue where the PC response subtitles still show up on the screen, even though I've ticked the "skip PC subtitle after response" option in the Dialogue Manager. This issue only occurs when I use my custom "Skip" function.

Here's part of the code for my Skip function:

Code: Select all

    public void Skip(){
        

        skip = true;
        dialogueUI.OnContinueConversation();

    }

    void OnConversationLine(Subtitle subtitle)
    {
        if (skip)
        {
            subtitle.sequence = "Continue()";
        }
    }


    void OnConversationResponseMenu(Response[] responses)
    {
        skip = false;
        dialogueUI.ShowSubtitle(DialogueManager.currentConversationState.subtitle);
    }

    void OnConversationEnd(Transform actor)
{
    skip = false;
}

I have reviewed the documentation and attempted to troubleshoot the problem, but have not been able to find a solution.

I would be grateful if you could provide any advice or resources on how I can resolve this issue and prevent the PC response subtitles from appearing on the screen while still being able to use my custom "Skip" function.

Thank you for creating such a great plugin and for your support.

Best,

Re: Skip PC Subtitle after response not working

Posted: Wed Feb 15, 2023 10:28 pm
by Tony Li
Hi,

I used your code above in a test script and it seemed to work fine. But I don't know what Subtitle Settings and Input Settings you're using on your Dialogue Manager. That could be the difference. Can you send a reproduction project to tony (at) pixelcrushers.com?

Re: Skip PC Subtitle after response not working

Posted: Thu Feb 16, 2023 1:58 am
by Matcha
Got it. I think the issue might have something to do with Unity Input System. I've sent you an email with my project files attached regarding this issue. I hope that the files will be helpful in diagnosing the problem.

If you need anything else from me, just let me know. Thanks for your help with this!

Re: Skip PC Subtitle after response not working

Posted: Thu Feb 16, 2023 1:55 pm
by Tony Li
Hi,

Thank you for sending the reproduction project. I'll have an answer for you by tomorrow.

Re: Skip PC Subtitle after response not working

Posted: Thu Feb 16, 2023 11:17 pm
by Matcha
Awesome, thanks! Excited to hear back from you :)

Re: Skip PC Subtitle after response not working

Posted: Fri Feb 17, 2023 8:38 pm
by Tony Li
Hi,

Try this modified code:

Code: Select all

    private bool showedMenu = false;

    public void Skip()
    {
        skip = true;
        dialogueUI.OnContinueConversation();
    }

    void OnConversationLine(Subtitle subtitle)
    {
        if (skip)
        {
            subtitle.sequence = "Continue()";
        }
        if (showedMenu)
        {
            showedMenu = false;
            skip = false;
        }
    }

    void OnConversationResponseMenu(Response[] responses)
    {
        showedMenu = true;
        dialogueUI.ShowSubtitle(DialogueManager.currentConversationState.subtitle);
    }

    void OnConversationEnd(Transform actor)
    {
        skip = false;
        showedMenu = false;
    }

Re: Skip PC Subtitle after response not working

Posted: Sat Feb 18, 2023 3:46 pm
by Matcha
Awesome! The modified code is working perfectly! Thank you so much!

Re: Skip PC Subtitle after response not working

Posted: Sat Feb 18, 2023 4:15 pm
by Tony Li
Glad to help!