Page 3 of 3

Re: NPC Panel Doesn't Hide Immediately

Posted: Sat Dec 10, 2016 7:24 pm
by airwick
The issue seems to be with this new line of code in TextMeshProSubtitleControls:ShowPanel

Code: Select all

			// If active, disable & reenable to trigger typewriter:
			if (line.gameObject.activeInHierarchy)
			{
				line.gameObject.SetActive(false);
				line.gameObject.SetActive(true);
			}
The fix seems to be:

Code: Select all

			if (line != null && line.gameObject.activeInHierarchy)
			{
				line.gameObject.SetActive(false);
				line.gameObject.SetActive(true);
			}

Re: NPC Panel Doesn't Hide Immediately

Posted: Sat Dec 10, 2016 9:11 pm
by Tony Li
Hi,

Thank you. Is the fix still working for you? I'll incorporate it into the source.

Re: NPC Panel Doesn't Hide Immediately

Posted: Sat Dec 10, 2016 9:44 pm
by airwick
Yes it's working now with no errors, thanks.

Re: NPC Panel Doesn't Hide Immediately

Posted: Mon Dec 19, 2016 2:02 am
by airwick
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.

Re: NPC Panel Doesn't Hide Immediately

Posted: Mon Dec 19, 2016 7:22 am
by Tony Li
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.

TextMeshPro_Support_2016-12-19.unitypackage