SetDiscreteCurves(AnimationClip, EditorCurveBinding[], DiscreteKeyframe[][])
Adds, modifies, or removes discrete curves in an animation clip.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
public static void SetDiscreteCurves(AnimationClip clip, EditorCurveBinding[] bindings, DiscreteKeyframe[][] keyframes)
Parameters
The animation clip to modify.
The bindings that define the paths and the properties of each curve.
Array of integer keyframe arrays, one per binding.
Remarks
This method is equivalent to calling AnimationUtility.SetDiscreteCurve for each individual curve. This method also applies relevant post-processing operations only once. This method modifies discrete curves. For float curves, see AnimationUtility.SetEditorCurves. For object reference curves, see: AnimationUtility.SetObjectReferenceCurves.