Edit animation clip direct in code

Is here any possibility to update/change animation curves/or animated parameters on frame direct in code ?

something like that:

Animation a = GetComponent<Animation>();
AnimationClip clip = a.GetClip("Clip01");
clip. // FOR EXAMPLE EDIT value of transform.X at frame 40

You can’t edit animations at runtime. You can create an animation from scratch and use AnimationClip.SetCurve to build up your animation, but you can’t access the curves directly at runtime.

However in an editor script you can use the AnimationUtilitys to modify an Animationclip, but of course only in the editor since this is an editor class.

If you want something more spectacular, then check this out: Runtime Curve Editor | GUI Tools | Unity Asset Store
With it, you are able to visually edit curves in game (not just in editor).