SetDiscreteCurve(AnimationClip, EditorCurveBinding, DiscreteKeyframe[])
Adds, modifies, or removes a discrete curve in an animation clip.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
public static void SetDiscreteCurve(AnimationClip clip, EditorCurveBinding binding, DiscreteKeyframe[] keyframes)
Parameters
The animation clip to modify.
The bindings that define the paths and the properties of each curve.
Array of integer values over time. Setting this to null will remove the curve.
Remarks
Unity has three types of animation curves: float curve, discrete curve and object reference curve. A float curve is a classic curve that animates a float property over time. A discrete curve is a collection of integer keyframes that animates a discrete integer property over time. An object reference curve is a construct that animates an object reference property over time.