Issue Encountered When Using Sequencer Command to Control ContinueMode

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
WeiYiHua
Posts: 9
Joined: Mon Mar 25, 2024 10:27 pm

Issue Encountered When Using Sequencer Command to Control ContinueMode

Post by WeiYiHua »

Version 2.2.45

1. SetContinueMode(original) Has No Effect
It seems that in Sequencer.HandleSetContinueModeInternally, the originally correct code has been commented out, resulting in incorrect functionality in the current version. For example, lines 2724, 2733, and 2734 have been commented out.

2. Conflict between UpdateActiveConversationContinueButton and StandardUISubtitlePanel.blockInputDuration
This conflict arises due to the absence of stopping the ShowContinueButtonAfterBlockDuration Coroutine in the HideContinueButton method. It is suggested to initially halt any started ShowContinueButtonAfterBlockDuration Coroutine in both ShowContinueButton and HideContinueButton, as illustrated in the following example:

Code: Select all

private Coroutine m_ShowContinueButtonCoroutine; 

public virtual void ShowContinueButton()
{
    if (m_ShowContinueButtonCoroutine != null)
    {
        DialogueManager.instance.StopCoroutine(m_ShowContinueButtonCoroutine);
    }
    if (blockInputDuration > 0)
    {
        m_ShowContinueButtonCoroutine = DialogueManager.instance.StartCoroutine(ShowContinueButtonAfterBlockDuration());
    }
    else
    {
        ShowContinueButtonNow();
    }
}

protected virtual IEnumerator ShowContinueButtonAfterBlockDuration()
{
    if (continueButton == null) yield break;
    continueButton.interactable = false;

    // Wait for panel to open, or timeout:
    var timeout = Time.realtimeSinceStartup + 10f;
    while (panelState != PanelState.Open && Time.realtimeSinceStartup < timeout)
    {
        yield return null;
    }

    yield return DialogueManager.instance.StartCoroutine(DialogueTime.WaitForSeconds(blockInputDuration));
    continueButton.interactable = true;
    ShowContinueButtonNow();
    m_ShowContinueButtonCoroutine = null;
}

public virtual void HideContinueButton()
{
    if (m_ShowContinueButtonCoroutine != null)
    {
        DialogueManager.instance.StopCoroutine(m_ShowContinueButtonCoroutine);
    }
    Tools.SetGameObjectActive(continueButton, false);
}

User avatar
Tony Li
Posts: 20754
Joined: Thu Jul 18, 2013 1:27 pm

Re: Issue Encountered When Using Sequencer Command to Control ContinueMode

Post by Tony Li »

Hi,
WeiYiHua wrote: Mon Apr 29, 2024 12:10 pm1. SetContinueMode(original) Has No Effect
It seems that in Sequencer.HandleSetContinueModeInternally, the originally correct code has been commented out, resulting in incorrect functionality in the current version. For example, lines 2724, 2733, and 2734 have been commented out.
Have you imported the SetContinueMode(original) patch available on the Dialogue System Extras page? This bug was introduced in a recent version. The patch fixes it. The fix will also be in version 2.2.46.
WeiYiHua wrote: Mon Apr 29, 2024 12:10 pm2. Conflict between UpdateActiveConversationContinueButton and StandardUISubtitlePanel.blockInputDuration
This conflict arises due to the absence of stopping the ShowContinueButtonAfterBlockDuration Coroutine in the HideContinueButton method. It is suggested to initially halt any started ShowContinueButtonAfterBlockDuration Coroutine in both ShowContinueButton and HideContinueButton, as illustrated in the following example: ...
Thanks. I'll evaluate this and put changes in version 2.2.46.
WeiYiHua
Posts: 9
Joined: Mon Mar 25, 2024 10:27 pm

Re: Issue Encountered When Using Sequencer Command to Control ContinueMode

Post by WeiYiHua »

Thank you for your reminder!
User avatar
Tony Li
Posts: 20754
Joined: Thu Jul 18, 2013 1:27 pm

Re: Issue Encountered When Using Sequencer Command to Control ContinueMode

Post by Tony Li »

Glad to help!
Post Reply