TextAnimator Fast Forward Script
Posted: Tue Dec 06, 2022 8:30 pm
Hello again.
TextAnimator skips to the next dialogue line when you click by default (which makes sense, since I believe the default FastForward only works for the default typewriter classes and things derived from it.)
I'm not sure if there's a package or script to handle it already that Tony has hidden somewhere, but hey, here's the TextAnimatorFastForward script I use to handle finishing the text appearance before going to the next dialogue:
You may not need the namespace declaration and you can private/serializefield the textanimator, but I'm very lazy. Also, the tab size on the forum being 8 spaces wide is monstrous. Borderline criminal.
Enjoy.
TextAnimator skips to the next dialogue line when you click by default (which makes sense, since I believe the default FastForward only works for the default typewriter classes and things derived from it.)
I'm not sure if there's a package or script to handle it already that Tony has hidden somewhere, but hey, here's the TextAnimatorFastForward script I use to handle finishing the text appearance before going to the next dialogue:
Code: Select all
using Febucci.UI;
using UnityEngine;
namespace PixelCrushers.DialogueSystem.Wrappers
{
public class TextAnimatorFastForward : PixelCrushers.DialogueSystem.StandardUIContinueButtonFastForward
{
public TextAnimator textAnimator;
public override void OnFastForward()
{
if(!textAnimator.allLettersShown)
{
textAnimator.ShowAllCharacters(false);
}
else
{
base.OnFastForward();
}
}
}
}
Enjoy.