Skip PC Subtitle after response not working

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Matcha
Posts: 10
Joined: Fri Dec 31, 2021 1:12 am

Skip PC Subtitle after response not working

Post 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,
User avatar
Tony Li
Posts: 22135
Joined: Thu Jul 18, 2013 1:27 pm

Re: Skip PC Subtitle after response not working

Post 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?
Matcha
Posts: 10
Joined: Fri Dec 31, 2021 1:12 am

Re: Skip PC Subtitle after response not working

Post 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!
User avatar
Tony Li
Posts: 22135
Joined: Thu Jul 18, 2013 1:27 pm

Re: Skip PC Subtitle after response not working

Post by Tony Li »

Hi,

Thank you for sending the reproduction project. I'll have an answer for you by tomorrow.
Matcha
Posts: 10
Joined: Fri Dec 31, 2021 1:12 am

Re: Skip PC Subtitle after response not working

Post by Matcha »

Awesome, thanks! Excited to hear back from you :)
User avatar
Tony Li
Posts: 22135
Joined: Thu Jul 18, 2013 1:27 pm

Re: Skip PC Subtitle after response not working

Post 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;
    }
Matcha
Posts: 10
Joined: Fri Dec 31, 2021 1:12 am

Re: Skip PC Subtitle after response not working

Post by Matcha »

Awesome! The modified code is working perfectly! Thank you so much!
User avatar
Tony Li
Posts: 22135
Joined: Thu Jul 18, 2013 1:27 pm

Re: Skip PC Subtitle after response not working

Post by Tony Li »

Glad to help!
Post Reply