# DiscreteKeyframe

> Keyframe to a discrete integer value.

## Definition

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

```csharp
public struct DiscreteKeyframe
```

## Remarks

Use a discrete keyframe to create an array of integer values. An [AnimationClip](/engine/7000.0/script-reference/unityengine/animationclip.md) uses an array of integer values to animate discrete integer property values.

Use the [AnimationUtility.SetDiscreteCurve](/engine/7000.0/script-reference/unityeditor/animationutility/setdiscretecurve.md) and [AnimationUtility.SetDiscreteCurves](/engine/7000.0/script-reference/unityeditor/animationutility/setdiscretecurves.md) methods to assign [DiscreteKeyframe](/engine/7000.0/script-reference/unityeditor/discretekeyframe.md) arrays of integer property values to an [AnimationClip](/engine/7000.0/script-reference/unityengine/animationclip.md). Use the [AnimationUtility.GetDiscreteCurve](/engine/7000.0/script-reference/unityeditor/animationutility/getdiscretecurve.md) method to retrieve a [DiscreteKeyframe](/engine/7000.0/script-reference/unityeditor/discretekeyframe.md) array for a discrete property.

Additional Resources: [AnimationClip](/engine/7000.0/script-reference/unityengine/animationclip.md) [AnimationUtility.SetDiscreteCurve](/engine/7000.0/script-reference/unityeditor/animationutility/setdiscretecurve.md) [AnimationUtility.SetDiscreteCurves](/engine/7000.0/script-reference/unityeditor/animationutility/setdiscretecurves.md).

## Fields

| Value                                                                          | Description                        |
| ------------------------------------------------------------------------------ | ---------------------------------- |
| [time](/engine/7000.0/script-reference/unityeditor/discretekeyframe/time.md)   | The time of the keyframe.          |
| [value](/engine/7000.0/script-reference/unityeditor/discretekeyframe/value.md) | The integer value of the keyframe. |
