SetCurve() public method

public SetCurve ( int index, AnimationCurve curve ) : void
index int
curve UnityEngine.AnimationCurve
return void
 public static void UpdateTangentsFromMode(AnimationCurve curve, AnimationClip clip, EditorCurveBinding curveBinding)
 {
     if (RotationCurveInterpolation.GetModeFromCurveData(curveBinding) == RotationCurveInterpolation.Mode.NonBaked)
     {
         QuaternionCurveTangentCalculation quaternionCurveTangentCalculation = default(QuaternionCurveTangentCalculation);
         int curveIndexFromName = RotationCurveInterpolation.GetCurveIndexFromName(curveBinding.propertyName);
         for (int i = 0; i < 3; i++)
         {
             if (i == curveIndexFromName)
             {
                 quaternionCurveTangentCalculation.SetCurve(i, curve);
             }
             else
             {
                 EditorCurveBinding binding = curveBinding;
                 binding.propertyName = "localEulerAngles." + RotationCurveInterpolation.kPostFix[i];
                 AnimationCurve editorCurve = AnimationUtility.GetEditorCurve(clip, binding);
                 if (editorCurve == null)
                 {
                     return;
                 }
                 quaternionCurveTangentCalculation.SetCurve(i, editorCurve);
             }
         }
         quaternionCurveTangentCalculation.UpdateTangentsFromMode(curveIndexFromName);
     }
     else
     {
         CurveUtility.UpdateTangentsFromMode(curve);
     }
 }
 public static void UpdateTangentsFromMode(AnimationCurve curve, AnimationClip clip, EditorCurveBinding curveBinding)
 {
     if (RotationCurveInterpolation.GetModeFromCurveData(curveBinding) == RotationCurveInterpolation.Mode.NonBaked)
     {
         QuaternionCurveTangentCalculation calculation = new QuaternionCurveTangentCalculation();
         int curveIndexFromName = RotationCurveInterpolation.GetCurveIndexFromName(curveBinding.propertyName);
         for (int i = 0; i < 3; i++)
         {
             if (i == curveIndexFromName)
             {
                 calculation.SetCurve(i, curve);
             }
             else
             {
                 EditorCurveBinding binding = curveBinding;
                 binding.propertyName = "localEulerAngles." + RotationCurveInterpolation.kPostFix[i];
                 AnimationCurve editorCurve = AnimationUtility.GetEditorCurve(clip, binding);
                 if (editorCurve == null)
                 {
                     return;
                 }
                 calculation.SetCurve(i, editorCurve);
             }
         }
         calculation.UpdateTangentsFromMode(curveIndexFromName);
     }
     else
     {
         CurveUtility.UpdateTangentsFromMode(curve);
     }
 }