Multiple Small Questions regarding the Dialogue System

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 22115
Joined: Thu Jul 18, 2013 1:27 pm

Re: Multiple Small Questions regarding the Dialogue System

Post by Tony Li »

These are all stumpers. :-)
The_Kihng wrote: Mon Aug 28, 2023 11:25 pmOkay. Get this. I followed your instructions. The dialogue manager is using my prefab, and if you observe the Subtitle TMP object in the inspector as you start a conversation, it inserts Subtitle Text before the dialogue comes up. I've checked and double checked seemingly everything. There is no mention of that phrase anywhere... Not in the conversation, not in the UI, not in any of the Actor's or Conversants' components... Nothing! The only thing I can think of is that the example you sent me still has that. I'm going to delete it just to be safe. ... Nope, that wasn't it. I am dumbfounded. Bewildered, even.

Edit: Thought this might be important. It only shows up the first time you run dialogue. Subsequent conversations don't show it.
I have no idea. Feel free to send a reproduction project to tony (at) pixelcrushers.com. Or you could put a breakpoint in the StandardUISubtitlePanel script's SetContent() method in your code editor. Then play the game and step through the method to see if it sets the subtitle text to "Subtitle Text" somehow.
The_Kihng wrote: Mon Aug 28, 2023 11:25 pmThis is even weirder than the other issue. For a bit I thought I had broken it, because the cursor wasn't showing up. I finally checked the object, and it was to the far right of the canvas, being masked. So I put it back. Then it was in the middle of the response button. So I checked again, and it was there. Okay, weird. So I put it back. Turns out whenever I resize the game or scene window horizontally, the cursor doesn't move along with everything else despite being childed, even when the game is running. It might be because I have it set to 'Ignore Layout' because if I don't, it gets attached to the inside of the Response Button and stretched horribly. Not sure what to do about that, but I can definitely grab those screenshots if you want them. I think a recording might be more apt, though.
That sounds like a Rect Transform anchoring issue. Unity's Rect Transform tutorial may provide some helpful tips.
The_Kihng wrote: Mon Aug 28, 2023 11:25 pmNope. Also it doesn't seem as bad now that the issue with the Continue Button is fixed. It's still happening, but for maybe half the duration now. So this isn't a big of a concern as the others. I'm sorry to be taking up so much of your time, but this has me absolutely stumped.
Again, feel free to send a reproduction project. I may have mentioned this already, but you also set the Dialogue Manager's Other Settings > Debug Level to Info to log what's going on under the hood. If you see a Delay(...) method logged after clicking the response button, this may be what's causing the delay.

Then again, maybe the menu is waiting for its Hide animation to finish. If the StandardUIMenuPanel component's Wait For Close checkbox is ticked, try unticking it.
User avatar
Tony Li
Posts: 22115
Joined: Thu Jul 18, 2013 1:27 pm

Re: Multiple Small Questions regarding the Dialogue System

Post by Tony Li »

Thanks for sending the repro project. I replied to your email. I'll paste the text here, too, for future reference.

For the Subtitle Text issue, it looks like it's a conflict between the TextMeshProTypewriterEffect and Text Animator. Use one or the other.

- If you use TextMeshProTypewriterEffect, remove the Text Animator component and UNtick the TextMeshProTypewriterEffect component's Play On Enable.

- However, since your project has Text Animator in it, you might as well use it to get access to its fancier effects. Remove the TextMeshProTypewriterEffect. Tick the Text Animator component's Typewriter Starts Automatically, and add a Typewriter - By Character (or By Word) component. For your continue button, you'll want to use a TextAnimatorContinueButtonFastForward component instead of StandardUIContinueButtonFastForward. See Text Animator Integration for more info.

You may also notice a delay before the first line's text starts typing. To fix this, open your conversation in the Dialogue Editor. Inspect the <START> node and click "I understand. Edit anyway." Remove "{{default}};" from the Sequence field. Otherwise it will run the default sequence, which will delay for 1 second.


> 3.) Before choosing, if you mouse over the second response, a second cursor will appear. This only happens when the mouse is used, and I will be disabling this.

In case you want to use the mouse in the future, add a Deselect Previous On Pointer Enter component on the Response Button Template. This will prevent second cursors. Unity UI's default behavior is to show that second cursor, which makes no sense to me, so we added this component to change the behavior.

> 4.) Try to resize the play view. The cursor will stay in place while everything else moves.

Try changing the Cursor's Rect Transform anchoring to upper right and Pivot X = 1


> 6.) After you make a choice, there is a short delay before showing the next line.

In general, if the Dialogue System logs a yellow warning or a red error, it indicates a configuration error or something similar that's important to look into. In this case, it logged:

Parameter 'Show' does not exist.
Parameter 'Hide' does not exist.

This is because the menu panel doesn't have an Animator. To fix the issue, clear the menu panel's Show Animation Trigger and Hide Animation Trigger, and untick the Wait For Show Animation and Wait For Close checkboxes since they're only applicable when using animations.
Post Reply