Modify individual animation curve

Guys, I’m getting pretty desperate here. As you can see in the image I have an animation of a human model. I need to modify, from script, the value of the Rotation.y in the legRb Animation Clip. Please tell me how is it possible to do so (Basically I need to modify the curve).
Thanks.

1

I don’t see a human model but i see the animation curves :wink: Your screenshot is quite small so i can’t see if the animationclip is an imported animation (fbx import) or an AnimationClip created in Unity. The big difference is that imported animations (from blender, 3dsmax, maya) are read-only because they belong to the fbx file which can’t be edited in Unity.

I suggest to change the animation in the modelling tool it’s created in. You can of course use an editor script to copy / duplicate the animationClip and store it as .anim file so it can be edited in Unity but i’m not sure if that’s what you want.

At runtime you can set a curve, but you can’t read them. So changing is a bit difficult:

http://unity3d.com/support/documentation/ScriptReference/AnimationClip.SetCurve.html