# SetDiscreteCurve(AnimationClip, EditorCurveBinding, DiscreteKeyframe[])

> Adds, modifies, or removes a discrete curve in an animation clip.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/7000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public static void SetDiscreteCurve(AnimationClip clip, EditorCurveBinding binding, DiscreteKeyframe[] keyframes)
```

### Parameters

**** (\[AnimationClip]\(/engine/7000.0/script-reference/unityengine/animationclip)): The animation clip to modify.**** (\[EditorCurveBinding]\(/engine/7000.0/script-reference/unityeditor/editorcurvebinding)): The bindings that define the paths and the properties of each curve.**** (\[DiscreteKeyframe\[]]\(/engine/7000.0/script-reference/unityeditor/discretekeyframe)): 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.
