Issue Encountered When Using Sequencer Command to Control ContinueMode
Posted: Mon Apr 29, 2024 12:10 pm
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:
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);
}