Today I needed to play an animation clip reversed to undo an effect and noticed that the PlayAnimatorClip clip didn’t have such functionality.
So I did a quick implementation.
Would be great if you could consider adding it in a future update.
In the PlayAnimatorClip class, I added a field
1
2
3
[SerializeField]
[HelpBox("Set to make the animation clip play in the reverse direction.")]
privatebool_playReverse;
Then, on the OnUpdate method, I did the following change
I also needed this feature and did a pretty much identical implementation.
Would be nice to have it included officially, this is very useful.
Searching around the net, I can see people requesting a way to do this for a long time. It’s still not possible to have it with the latest Unity timeline. Having access to the source and being able to change it quickly is fundamental.
Thanks for the heads up.
An easier way, would be to simply allow a negative playback speed by changing the Range attribute to something like [Range(-5, 5] 😀 (which is something I just did by the way).
😉
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.