Page 1 of 1
How to hide/appear Response button right after click/typewriter?
Posted: Wed May 05, 2021 3:54 pm
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
Re: How to hide/appear Response button right after click/typewriter?
Posted: Wed May 05, 2021 8:31 pm
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.
Re: How to hide/appear Response button right after click/typewriter?
Posted: Thu May 06, 2021 10:09 am
by PepeJEe
Hey! Thanks, I got the response button appear after typewriter effect
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?
Re: How to hide/appear Response button right after click/typewriter?
Posted: Thu May 06, 2021 11:35 am
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?
Re: How to hide/appear Response button right after click/typewriter?
Posted: Thu May 06, 2021 12:08 pm
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
Re: How to hide/appear Response button right after click/typewriter?
Posted: Thu May 06, 2021 1:52 pm
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.
Re: How to hide/appear Response button right after click/typewriter?
Posted: Thu May 06, 2021 2:08 pm
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
Re: How to hide/appear Response button right after click/typewriter?
Posted: Thu May 06, 2021 2:26 pm
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!