UMG widget button, click expand, click again collapse?
Hi, I'm making a simple interface, I added a button that onClick plays an animation, and I want it to play the animation in reverse the next click, and loop between these two behaviours forever? how do I do so?
asked Aug 03 '18 at 04:23 PM in Blueprint Scripting
One simple way is you can add a boolean variable to your widget blueprint to keep track of the state of the button click and then depending on that value either play the animation forward or reverse. Here's an image showing a quick example of how you'd set it up in your widget blueprint.
It's important that 'Button Clicked' is set to false by default so your animation will play forward the first time with this setup.
I hope that helps!
answered Aug 03 '18 at 05:35 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here