So I’m building a very intricate machine model that has thousands of animated parts the user can activate.
Each part only has one animation, “take off” or “open” which is pretty simple. I can get the animation to play in one direction “take off” with this
animator.Play("part351animation");
but I can’t for the life of me figure out how to get it to play in reverse.
I’ve tried animator.speed = -1f;
but it just spits out console errors about the recorder not being enabled.
I can manually set the speed on the animation via the inspector but I can’t figure out how to access that property via code to switch between 1f and -1f.
I’ve also tried animator.SetFloat("Speed" -1f);
but it says that paramater does not exist. I know I could manually use the mechanim to create different states but with thousands of parts it would take me ages for something that seems like it should be simple.
In a perfect world I see it being animator.Play("part351animation", -1f);
where -1f is speed.
I’d like a code solution that I can put into place without having to reimport all of my animations differently or setting them as legacy.