Page 1 of 2
delayTypewriterUntilOpen
Posted: Tue Aug 24, 2021 5:15 pm
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?
Re: delayTypewriterUntilOpen
Posted: Tue Aug 24, 2021 9:25 pm
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.
Re: delayTypewriterUntilOpen
Posted: Tue Aug 24, 2021 9:54 pm
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?
Re: delayTypewriterUntilOpen
Posted: Tue Aug 24, 2021 10:20 pm
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.
Re: delayTypewriterUntilOpen
Posted: Tue Aug 24, 2021 10:43 pm
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.
Re: delayTypewriterUntilOpen
Posted: Wed Aug 25, 2021 12:20 am
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.
Re: delayTypewriterUntilOpen
Posted: Wed Aug 25, 2021 10:34 am
by Tony Li
Hi,
Is the subtitle panel's Visibility set to Always From Start?
Re: delayTypewriterUntilOpen
Posted: Wed Aug 25, 2021 11:08 am
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.
Re: delayTypewriterUntilOpen
Posted: Wed Aug 25, 2021 11:45 am
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.
Re: delayTypewriterUntilOpen
Posted: Wed Aug 25, 2021 1:20 pm
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?