Page 1 of 1

Issue Encountered When Using Sequencer Command to Control ContinueMode

Posted: Mon Apr 29, 2024 12:10 pm
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);
}


Re: Issue Encountered When Using Sequencer Command to Control ContinueMode

Posted: Mon Apr 29, 2024 2:43 pm
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.

Re: Issue Encountered When Using Sequencer Command to Control ContinueMode

Posted: Mon Apr 29, 2024 3:11 pm
by WeiYiHua
Thank you for your reminder!

Re: Issue Encountered When Using Sequencer Command to Control ContinueMode

Posted: Mon Apr 29, 2024 4:45 pm
by Tony Li
Glad to help!