Hey, I am setting up my own UI and I want to have pressed animation or colour tint. Now for some reason it's not working, when i press the button it only disappears.
Here is a drive link for all my dialogue settings. Also im using the colour tint, so it should turn red when i press the button, but it won't, you can see it happening from the video. Recommend downloading the video, bcs inside google drive it's only 360p.
https://drive.google.com/file/d/1ylgU1Y ... sp=sharing
Just realized, it does the pressed transition when using mouse to navigate, but i want it to work with arrows/enter.
-Pepe
"Pressed" transition(colour tint/animation) not happening when pressing a response button.
Re: "Pressed" transition(colour tint/animation) not happening when pressing a response button.
Hi Pepe,
That's just the way Unity UI works with keyboard/joystick navigation. It doesn't have anything to do with the Dialogue System. You could write a script to make it briefly show the clicked state. See the UIButtonKeyTrigger.cs script for some example code that you could use.
That's just the way Unity UI works with keyboard/joystick navigation. It doesn't have anything to do with the Dialogue System. You could write a script to make it briefly show the clicked state. See the UIButtonKeyTrigger.cs script for some example code that you could use.
Re: "Pressed" transition(colour tint/animation) not happening when pressing a response button.
Thank you Tony! Weird thing is pressed animation doesnt work in the dialogue, but it works in my main menu screen. Well i'll try to figure that out somehow.
Another quick question: When I press play, weird 3 objects will pop up in the Dontdestroyonload, should they be there? Do i need them, if not how can i remove them ?
Another quick question: When I press play, weird 3 objects will pop up in the Dontdestroyonload, should they be there? Do i need them, if not how can i remove them ?
- Attachments
-
- screeenshot.PNG (14.3 KiB) Viewed 852 times
Re: "Pressed" transition(colour tint/animation) not happening when pressing a response button.
The Dialogue Manager's Instantiate Prefabs component is instantiating them. You can disable or remove the Instantiate Prefabs component, or clear its Prefabs list.
Re: "Pressed" transition(colour tint/animation) not happening when pressing a response button.
Thank you Tony, i got them removed
Also I added "Play pressed animation" into OnClick event for the buttons, and now it works perfectly I had to tweak the animator a little bit
-Pepe
Also I added "Play pressed animation" into OnClick event for the buttons, and now it works perfectly I had to tweak the animator a little bit
-Pepe
Re: "Pressed" transition(colour tint/animation) not happening when pressing a response button.
Hi Pepe,
Great! Glad you got it working the way you want.
Great! Glad you got it working the way you want.