# SetKeyBroken(AnimationCurve, int, bool)

> Change the specified keyframe broken tangent flag.

## Definition

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

```csharp
public static void SetKeyBroken(AnimationCurve curve, int index, bool broken)
```

### Parameters

**** (\[AnimationCurve]\(/engine/6000.0/script-reference/unityengine/animationcurve)): The curve to modify.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Keyframe index.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Broken flag.

### Remarks

The keyframe broken flag will be used by the Curve Editor to generate tangents automatically.  Changing the broken flag here will also recalculate [Keyframe.inTangent](/engine/6000.0/script-reference/unityengine/keyframe/intangent.md) and [Keyframe.outTangent](/engine/6000.0/script-reference/unityengine/keyframe/outtangent.md).

Additional Resources: [AnimationUtility.SetKeyLeftTangentMode](/engine/6000.0/script-reference/unityeditor/animationutility/setkeylefttangentmode.md), [AnimationUtility.SetKeyRightTangentMode](/engine/6000.0/script-reference/unityeditor/animationutility/setkeyrighttangentmode.md).
