Play and Pause animation with same trigger.
I would like to see if it is possible to start, pause, and continue playing a 2d animation with the same trigger.
On load, the animation is stopped and then I'd like to trigger the start of the animation, and then be able to pause/play the animation using the same trigger that originally started the animation.
Basically looking for a play/pause toggle.
Thanks!
Hi CrimsonVIII,
This is possible with a simple script. See this guide.
Essentially, you just call play() or pause() depending on isPlaying().
Let us know if you need more detailed instructions!
Cheers,
Neha
That should help, thank you!
My scripting muscles are a bit rusty, so if I have a hard time, I'll let you know.
Thanks again!
I think I could use some more help on this. I tried to reverse engineer the behavior script, to include play, pause, and resume, but it's a bit to verbose for me to be able to get working.
Any additional assistance would be great!
Thanks.