How to hide/appear Response button right after click/typewriter?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
PepeJEe
Posts: 18
Joined: Sat Apr 24, 2021 8:39 am

How to hide/appear Response button right after click/typewriter?

Post by PepeJEe »

Hey! How can i make my response button disappear immediately after i press it. Currently it disappears after 1 or 2 seconds after press/onClick. And How can i make it appear right after my typewriter effect has ended? :)

-Pepe
User avatar
Tony Li
Posts: 21722
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to hide/appear Response button right after click/typewriter?

Post by Tony Li »

Hi Pepe,
PepeJEe wrote: Wed May 05, 2021 3:54 pmHey! How can i make my response button disappear immediately after i press it. Currently it disappears after 1 or 2 seconds after press/onClick.
Inspect the Dialogue Manager GameObject. Make sure Display Settings > Camera & Cutscene Settings > Default Player Sequence is blank. My guess is that it's playing a default sequence such as "Delay({{end}})". If it's blank and Subtitle Settings > Show PC Subtitles During Line is UNticked, then it will disappear immediately after pressing. If that doesn't do it, check the Console window for errors or warnings.
PepeJEe wrote: Wed May 05, 2021 3:54 pmAnd How can i make it appear right after my typewriter effect has ended? :)
Inspect the Dialogue Manager. Set Subtitle Settings > Min Subtitle Seconds to 0 and Subtitle Chars Per Second to the same value as the dialogue UI's Subtitle Text > Unity UI Typewriter Effect (or TextMesh Pro Typewriter Effect) > Characters Per Second. By default, the value is 50.
PepeJEe
Posts: 18
Joined: Sat Apr 24, 2021 8:39 am

Re: How to hide/appear Response button right after click/typewriter?

Post by PepeJEe »

Hey! Thanks, I got the response button appear after typewriter effect :D But I still have the little delay after i press the response buttons. I have nothing on the default player sequence and show pc subtitles during line is off.
Basically when I press the answer button, the opacity goes lower and then disappears after around 1 sec. Also I didn't see any errors.

I attached a gif which shows, how the opacity goes lower when i press/(punch with my character), I hope the gif works xD. :)


EDIT:
I just realized that I had "Unity UI Dialogue UI" Instead of "Standard Dialogue UI". Could it be that?
Attachments
animGif.gif
animGif.gif (565.93 KiB) Viewed 698 times
unitypic.PNG
unitypic.PNG (33.39 KiB) Viewed 698 times
User avatar
Tony Li
Posts: 21722
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to hide/appear Response button right after click/typewriter?

Post by Tony Li »

Hi,

I don't think Unity UI Dialogue UI is the issue. But if you can update your UI to use Standard Dialogue UI it will be easier to configure in general. Unity UI Dialogue UI is deprecated and may be removed in a future version. (You may be seeing messages about this in the Console window.)

What is the response button's OnClick() event connected to?
PepeJEe
Posts: 18
Joined: Sat Apr 24, 2021 8:39 am

Re: How to hide/appear Response button right after click/typewriter?

Post by PepeJEe »

Hi!

Yeah, i changed it to standard :)

Response button's on click event is set to "Standard Ui repsonse button script" and .OnClick + also I have onclick animation
Attachments
unitypic2.PNG
unitypic2.PNG (20.19 KiB) Viewed 695 times
User avatar
Tony Li
Posts: 21722
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to hide/appear Response button right after click/typewriter?

Post by Tony Li »

Are you trying to make OnClick() play an animation on the button itself?

Normally you'll set up button animations by changing the Transition type to Animation.
PepeJEe
Posts: 18
Joined: Sat Apr 24, 2021 8:39 am

Re: How to hide/appear Response button right after click/typewriter?

Post by PepeJEe »

Upsie, i forgot the animation transitions in the button xD my bad...
I'll delete the animation on the onclick event and use it in the transitions
PepeJEe
Posts: 18
Joined: Sat Apr 24, 2021 8:39 am

Re: How to hide/appear Response button right after click/typewriter?

Post by PepeJEe »

Hey Tony!! I deleted my normal text component and replaced it with text mesh pro component. Now my button disappears perfectly ;D!

Thanks for the help, next thing is to add some animations ;D!
Post Reply