delayTypewriterUntilOpen

Announcements, support questions, and discussion for the Dialogue System.
hipsterdufus
Posts: 97
Joined: Thu Aug 12, 2021 6:39 pm

delayTypewriterUntilOpen

Post by hipsterdufus »

Hi there again! I am having an issue with delayTypewriterUntilOpen - it doesn't seem to be working. The typewriter is writing before the show animation is finished. I tried debugging and in the code it looks like it checks for delayTypewriterUntilOpen && !hasFocus. hasFocus is always true so it never starts the delay coroutine and just starts the typewriter. Is there a configuration setting I missed?
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: delayTypewriterUntilOpen

Post by Tony Li »

Hi,

Try unticking Has Focus (at design time).

The typewriter will start typing when the panel's Show animation has finished. It's possible that the Focus animation will still be playing, though, if your panel has a Focus animation.
hipsterdufus
Posts: 97
Joined: Thu Aug 12, 2021 6:39 pm

Re: delayTypewriterUntilOpen

Post by hipsterdufus »

Hmm, it's still not waiting. As soon as the conversation starts the hasFocus param goes to true and it's not entering that wait coroutine. Maybe because I'm triggering the conversation from code? Anything else to check?
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: delayTypewriterUntilOpen

Post by Tony Li »

Is a UnityEvent such as OnOpen() manually setting Has Focus true?

If not, can you send a reproduction project to tony (at) pixelcrushers.com? I've finished work for the day, but I can check it in the morning.
hipsterdufus
Posts: 97
Joined: Thu Aug 12, 2021 6:39 pm

Re: delayTypewriterUntilOpen

Post by hipsterdufus »

Not that I know of. I'll see if I can put things into a scene for you if I don't figure it out tonight.
hipsterdufus
Posts: 97
Joined: Thu Aug 12, 2021 6:39 pm

Re: delayTypewriterUntilOpen

Post by hipsterdufus »

I did some debugging and it seems like there's a None() sequence that runs at the start of the conversation and when it finishes it checks UIPanel.panelState, sees that it's Open, and then calls Focus which focuses the subtitle element I guess. I can't really figure out why the panel is Open in the beginning immediately.
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: delayTypewriterUntilOpen

Post by Tony Li »

Hi,

Is the subtitle panel's Visibility set to Always From Start?
hipsterdufus
Posts: 97
Joined: Thu Aug 12, 2021 6:39 pm

Re: delayTypewriterUntilOpen

Post by hipsterdufus »

No it's set to Always Once Shown. I played with the option a little bit and it doesn't seem to make a difference in terms of the typewriter effect. I have it set to Always Once Shown because when it's Always From Start it enables the subtitle even when I use my secondary subtitle which is a problem for me.
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: delayTypewriterUntilOpen

Post by Tony Li »

Hi,

Can you reply with reproduction steps or send a reproduction project to tony (at) pixelcrushers.com?

Dialogue UIs can vary quite a lot. I can't determine the issue from the info we've discussed so far.

I did just do this test:

1. In Canvas Group Animator Controller, set the speed of all state nodes to 0.5 to make animations slower and easier to monitor.

2. In DemoScene1, assigned an instance of Basic Standard Dialogue UI to the Dialogue Manager's Dialogue UI field.

3. Ticked the NPC Subtitle Panel's Delay Typewriter Until Open checkbox.

Then I played the scene and talked to the NPC. Typing did not start until NPC Subtitle Panel's Show animation finished. Also, the Has Focus checkbox stayed unticked until the Show animation finished.
hipsterdufus
Posts: 97
Joined: Thu Aug 12, 2021 6:39 pm

Re: delayTypewriterUntilOpen

Post by hipsterdufus »

I'll try to recreate it in new project. I trust you but I'm a little afraid of sending my entire project to you :) . Question though - I notice that the animator controller doesn't have a showing state - it only has a show. So how does it know when it's done with the show animation? Am I missing something?
Post Reply