Typewriter Pause Codes and Reminder Text Bug

Announcements, support questions, and discussion for the Dialogue System.
Saruto
Posts: 24
Joined: Sat May 09, 2015 2:21 pm

Typewriter Pause Codes and Reminder Text Bug

Post by Saruto »

There's a bug regarding the Subtitle Reminder text and how it interacts with the Typewriter pause codes. Simply put, the reminder text shows the various pause codes (\, \. etc) when the response menu opens up. I don't think there's much nuance to describe, but let me know if you need more information. I couldn't find a way to fix this, so sorry if this was already addressed. Thanks!

I feel like I make a lot of threads regarding the Typewriter effect, heh.
User avatar
Tony Li
Posts: 22131
Joined: Thu Jul 18, 2013 1:27 pm

Re: Typewriter Pause Codes and Reminder Text Bug

Post by Tony Li »

Hi,

Have you updated to the latest version of the Dialogue System (1.6.2)? I'm out of the office right now, but I believe this was fixed recently in 1.6.1 or so.
Saruto
Posts: 24
Joined: Sat May 09, 2015 2:21 pm

Re: Typewriter Pause Codes and Reminder Text Bug

Post by Saruto »

I believe I did. I updated earlier this morning.

I'll try reinstalling/doing a fresh install in a bit to make sure.
Saruto
Posts: 24
Joined: Sat May 09, 2015 2:21 pm

Re: Typewriter Pause Codes and Reminder Text Bug

Post by Saruto »

Yeah, I reimported the system from the asset store and it's still showing up. I'm using Unity 5.3.4f1, so there shouldn't be a problem there.

Unrelated note, the RangeTrigger.cs script throws an exception after importing:
CS0077: The `as' operator cannot be used with a non-nullable value type `Behaviour'.
I don't think it's related but I should mention it.
User avatar
Tony Li
Posts: 22131
Joined: Thu Jul 18, 2013 1:27 pm

Re: Typewriter Pause Codes and Reminder Text Bug

Post by Tony Li »

Hi,

Add a Unity UI Ignore Pause Codes component to your subtitle reminder text element. (See the Generic Unity UI Dialogue UI for an example.)
Saruto wrote:Unrelated note, the RangeTrigger.cs script throws an exception after importing:
CS0077: The `as' operator cannot be used with a non-nullable value type `Behaviour'.
Thanks for letting me know. Your project must have another asset that defines a class named 'Behaviour', creating a conflict. I just updated RangeTrigger to explicitly refer to UnityEngine.Behaviour. This should get rid of the error.
Saruto
Posts: 24
Joined: Sat May 09, 2015 2:21 pm

Re: Typewriter Pause Codes and Reminder Text Bug

Post by Saruto »

Ahh, I see. Sorry, I'm still unfamiliar with all of the features of the Dialogue System.

It seems like there's another problem that's a little more specific, however. I wanted to have a feature where, if the player hits the continue key while the text is still being written, the rest of the text immediately shows up. I believe I read somewhere a while ago - it was possibly from you, but I don't remember - that in order to simulate this effect, you could check the UnityUITypewriterEffect's IsPlaying property to see if it was playing, then call the Stop function to immediately show the text if it was. If it's not playing, then the continue key would call OnContinue on the DialogueUI as usual.

It seems like the UnityUIIgnorePauseCodes script does not work well with this method, as the pause codes on the reminder text properly disappear if I let the typewriter effect naturally finish, but pop up if I hit the enter key prematurely.

Is there possibly a better way to implement the continue key feature? Sorry for the hassle!

And thanks for the RangeTrigger update too.
User avatar
Tony Li
Posts: 22131
Joined: Thu Jul 18, 2013 1:27 pm

Re: Typewriter Pause Codes and Reminder Text Bug

Post by Tony Li »

Hi,

This update takes care of the continue button issue: UnityUIIgnorePauseCodes_2016-05-08.unitypackage.
Saruto
Posts: 24
Joined: Sat May 09, 2015 2:21 pm

Re: Typewriter Pause Codes and Reminder Text Bug

Post by Saruto »

Hey,

This is almost perfect! Occasionally the text with the pause codes will flash for the first frame that the text is displayed. I can't exactly tell why this happens, as it's kind of inconsistent. It might have to do with interrupting the previous texts typewriter, but again it seems inconsistent. Maybe it's an execution order issue?
User avatar
Tony Li
Posts: 22131
Joined: Thu Jul 18, 2013 1:27 pm

Re: Typewriter Pause Codes and Reminder Text Bug

Post by Tony Li »

It was an execution order issue (which I believe I also addressed in the update below), but I finally bit the bullet and added a legitimate "Ignore Pause Codes" checkbox to Unity UI Dialogue UI. My design goal was to put as little functionality as possible in Unity UI Dialogue UI, and put the extra features in decorator classes that each developer could choose to add or omit. But in this case it's just cleaner to build in an option to never put pause codes in the Text element. You can remove the Unity UI Ignore Pause Codes component from your subtitle reminder line. Instead, on your Unity UI Dialogue UI, tick the checkbox Dialogue > Response Menu > Subtitle Reminder > Ignore Pause Codes.

UnityUISupport_2016-05-08a.unitypackage
Saruto
Posts: 24
Joined: Sat May 09, 2015 2:21 pm

Re: Typewriter Pause Codes and Reminder Text Bug

Post by Saruto »

Awesome, looks like it works!

And yeah, I understand. The Unity UI Dialogue UI script is already pretty hefty in the inspector, so I could see why you would want to have smaller features like this as a separate script. Sorry for making your Sunday a little more hectic, heh. I'm planning to release a small demo within the next day and I've been frantically combing over tiny things like this, so I really do appreciate all the quick changes you've done for me!

Hope you have a nice day!
Post Reply