Creating a New Reversed Clip From Existing Clip

I am coming up blank on this syntax. I have several clips I created in the Animation Editor for full body rigs and on Awake I want set up some new AnimationClips by reversing the already existing ones. So you reverse an already existing clip by setting the speed to a negative

animation["animName"].speed = -1.0;

however the only syntax I can see to set my clip var would be this…which is wrong of course…

var myReversedAnimationClip = new AnimationClip(animation["animName"].speed = -1.0);

Can I do this so I can set up sequences via scripting? Is AnimationClip the right class to try this with or is AnimationState or Animation better? Or is there an easy way to reverse a clip in the Animation Editor…though scripting is preferable as I want full control over everything frame by frame.

bump…

I can sample all frmaes and flip the sequence…but it seems that if I can find the syntax to just assign a reversed via negative speed clip to my reversed clip var that will suffice and forego a lengthy and tricky code process.

THX

Unfortunately, you can’t set a clip to be permanently reversed. You need to set the speed to -1 in each new AnimationState.