# AnimationUtility

> Editor utility functions for modifying animation clips.

## Definition

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

```csharp
public class AnimationUtility
```

## Static Fields

| Value                                                                                                      | Description                                                        |
| ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| [onCurveWasModified](/engine/6000.0/script-reference/unityeditor/animationutility/oncurvewasmodified-1.md) | Called when an animation curve, in an animation clip, is modified. |

## Static Methods

| Method                                                                                                                                       | Description                                                                                                                                                                                     |
| -------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [CalculateTransformPath](/engine/6000.0/script-reference/unityeditor/animationutility/calculatetransformpath.md)                             | Retrieves the path from the root Transform to the target Transform.                                                                                                                             |
| [EditorCurveBindingsToGenericBindings](/engine/6000.0/script-reference/unityeditor/animationutility/editorcurvebindingstogenericbindings.md) | Converts [EditorCurveBinding](/engine/6000.0/script-reference/unityeditor/editorcurvebinding.md) to [GenericBinding](/engine/6000.0/script-reference/unityengine/animations/genericbinding.md). |
| [GetAnimatableBindings](/engine/6000.0/script-reference/unityeditor/animationutility/getanimatablebindings.md)                               | Retrieves the animatable bindings for a specific GameObject.                                                                                                                                    |
| [GetAnimatedObject](/engine/6000.0/script-reference/unityeditor/animationutility/getanimatedobject.md)                                       | Retrieves the animated object that the binding points to.                                                                                                                                       |
| [GetAnimationClips](/engine/6000.0/script-reference/unityeditor/animationutility/getanimationclips.md)                                       | Retrieves an array of animation clips associated with a GameObject or component. `GetAnimationClips(Animation)` is obsolete and has been replaced with `GetAnimationClips(GameObject)`.         |
| [GetAnimationEvents](/engine/6000.0/script-reference/unityeditor/animationutility/getanimationevents.md)                                     | Retrieves all animation events associated with an animation clip.                                                                                                                               |
| [GetCurveBindings](/engine/6000.0/script-reference/unityeditor/animationutility/getcurvebindings.md)                                         | Retrieves the float curve bindings in an animation clip.                                                                                                                                        |
| [GetDiscreteIntValue](/engine/6000.0/script-reference/unityeditor/animationutility/getdiscreteintvalue.md)                                   | Retrieves the discrete integer value that the binding points to.                                                                                                                                |
| [GetEditorCurve](/engine/6000.0/script-reference/unityeditor/animationutility/geteditorcurve.md)                                             | Retrieves the float curve that the binding points to.                                                                                                                                           |
| [GetFloatValue](/engine/6000.0/script-reference/unityeditor/animationutility/getfloatvalue.md)                                               | Retrieves the float value that the binding points to.                                                                                                                                           |
| [GetKeyBroken](/engine/6000.0/script-reference/unityeditor/animationutility/getkeybroken.md)                                                 | Retrieves the broken tangent flag for a specfic keyframe.                                                                                                                                       |
| [GetKeyLeftTangentMode](/engine/6000.0/script-reference/unityeditor/animationutility/getkeylefttangentmode.md)                               | Retrieves the left tangent mode of the keyframe at a specific index.                                                                                                                            |
| [GetKeyRightTangentMode](/engine/6000.0/script-reference/unityeditor/animationutility/getkeyrighttangentmode.md)                             | Retrieves the right tangent mode of the keyframe at a specific index.                                                                                                                           |
| [GetObjectReferenceCurve](/engine/6000.0/script-reference/unityeditor/animationutility/getobjectreferencecurve.md)                           | Retrieves the object reference curve that the binding points to.                                                                                                                                |
| [GetObjectReferenceCurveBindings](/engine/6000.0/script-reference/unityeditor/animationutility/getobjectreferencecurvebindings.md)           | Retrieves the object reference curve bindings stored in the animation clip.                                                                                                                     |
| [GetObjectReferenceValue](/engine/6000.0/script-reference/unityeditor/animationutility/getobjectreferencevalue.md)                           | Retrieves the object value that the binding points to.                                                                                                                                          |
| [SetAdditiveReferencePose](/engine/6000.0/script-reference/unityeditor/animationutility/setadditivereferencepose.md)                         | Sets the additive reference pose from referenceClip at time for animation clip clip.                                                                                                            |
| [SetAnimationClips](/engine/6000.0/script-reference/unityeditor/animationutility/setanimationclips.md)                                       | Sets the array of animation clips to be referenced in the Animation component.                                                                                                                  |
| [SetAnimationEvents](/engine/6000.0/script-reference/unityeditor/animationutility/setanimationevents.md)                                     | Replaces all animation events in the animation clip.                                                                                                                                            |
| [SetEditorCurve](/engine/6000.0/script-reference/unityeditor/animationutility/seteditorcurve.md)                                             | Adds, modifies, or removes an editor float curve in an animation clip.                                                                                                                          |
| [SetEditorCurves](/engine/6000.0/script-reference/unityeditor/animationutility/seteditorcurves.md)                                           | Adds, modifies, or removes multiple editor float curves in an animation clip.                                                                                                                   |
| [SetKeyBroken](/engine/6000.0/script-reference/unityeditor/animationutility/setkeybroken.md)                                                 | Change the specified keyframe broken tangent flag.                                                                                                                                              |
| [SetKeyLeftTangentMode](/engine/6000.0/script-reference/unityeditor/animationutility/setkeylefttangentmode.md)                               | Change the specified keyframe tangent mode.                                                                                                                                                     |
| [SetKeyRightTangentMode](/engine/6000.0/script-reference/unityeditor/animationutility/setkeyrighttangentmode.md)                             | Change the specified keyframe tangent mode.                                                                                                                                                     |
| [SetObjectReferenceCurve](/engine/6000.0/script-reference/unityeditor/animationutility/setobjectreferencecurve.md)                           | Adds, modifies, or removes an object reference curve in an animation clip.                                                                                                                      |
| [SetObjectReferenceCurves](/engine/6000.0/script-reference/unityeditor/animationutility/setobjectreferencecurves.md)                         | Adds, modifies, or removes object references curve in an animation clip.                                                                                                                        |

## Enums

| Enum                                                                                                                    | Description                                                                                          |
| ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| [AnimationUtility.CurveModifiedType](/engine/6000.0/script-reference/unityeditor/animationutility/curvemodifiedtype.md) | Describes the type of modification that caused OnCurveWasModified to fire.                           |
| [AnimationUtility.TangentMode](/engine/6000.0/script-reference/unityeditor/animationutility/tangentmode.md)             | The TangentMode option for each [Keyframe](/engine/6000.0/script-reference/unityengine/keyframe.md). |

## Delegates

| Delegate                                                                                                                  | Description                                                                 |
| ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| [AnimationUtility.OnCurveWasModified](/engine/6000.0/script-reference/unityeditor/animationutility/oncurvewasmodified.md) | Triggered when an animation curve, in an animation clip, has been modified. |
