However, there are several ways to continue without the UI button:
1. Use the Continue() sequencer command in a sequence, such as the Sequence below to continue after 2 seconds:
Code: Select all
Continue()@2
3. Add a UIButtonKeyTrigger to the UI button. This lets you map additional inputs to click the button. Don't use Space or Return for UIButtonKeyTrigger hotkeys; Space and Return are already used by the Unity UI EventSystem to click the current selection. If you add them to UIButtonKeyTrigger, they can end up incorrectly clicking the button twice.
4. Or remove the continue button(s) from your dialogue UI, and add this script to your Subtitle Text GameObjects:
ContinueFastForward.cs
Code: Select all
using PixelCrushers.DialogueSystem;
using UnityEngine;
public class ContinueFastForward : MonoBehaviour
{
public KeyCode[] continueKeys = new KeyCode[] { KeyCode.Space, KeyCode.Return };
void Update()
{
foreach (var key in continueKeys)
{
if (InputDeviceManager.IsKeyDown(key))
{
FastForward();
return;
}
}
}
void FastForward()
{
var typewriterEffect = GetComponent<AbstractTypewriterEffect>();
if ((typewriterEffect != null) && typewriterEffect.isPlaying)
{
typewriterEffect.Stop();
}
else
{
GetComponentInParent<AbstractDialogueUI>().OnContinue();
}
}
}