// If active, disable & reenable to trigger typewriter:
if (line.gameObject.activeInHierarchy)
{
line.gameObject.SetActive(false);
line.gameObject.SetActive(true);
}
I'm finding an issue turning off the line object and turning it back on to trigger the type writer effect.
The UnityEvent calls to OnEnd are called twice, so it's calling it early when it's turned off and again when the type writer effect actually finishes. I use this to stop the character speaking animation.
This updated package has a more graceful solution. Instead of turning the line object off and back on, it adds an OnReshowPanel event to the TextMeshProDialogueUI's subtitle panel sections. You can use this event to call the typewriter effect's Rewind method, which is a cleaner way to make sure the typewriter runs properly.