Why is Animation Not Playing in Reverse?

Not sure what I’m doing wrong here. I have this code in a function, when it’s called I would like this animation to play backwards at twice the speed of normal.

Here’s my code:

		animation["playAnimationPlease"].layer=10;
		animation["playAnimationPlease"].wrapMode = WrapMode.Once;
		animation["playAnimationPlease"].speed=-2;
		animation.CrossFade("playAnimationPlease");

I can verify that the function gets called, and it does but the animation doesn’t play.

Any ideas?

Thanks!

As this forum post shows, you need to set the animation time to the end of the animation clip before playing it:

animation["playAnimationPlease"].layer=10;
animation["playAnimationPlease"].wrapMode = WrapMode.Once;
animation["playAnimationPlease"].speed=-2;
animation["playAnimationPlease"].time = animation["playAnimationPlease"].length;
animation.CrossFade("playAnimationPlease");

Please always do a google search before posting here to make sure the question hasn’t already been answered.

Thank you. Yes, I saw that post, it was my error. Apologies for beating a dead horse.