# InAnimationMode

> Checks whether the Editor is in Animation mode.

## Definition

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

## InAnimationMode()

Checks whether the Editor is in Animation mode.

```csharp
public static bool InAnimationMode()
```

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

### Remarks

[AnimationMode.InAnimationMode](/engine/6000.0/script-reference/unityeditor/animationmode/inanimationmode.md) returns a value of true or false, indicating whether the animation is being controlled by [AnimationMode](/engine/6000.0/script-reference/unityeditor/animationmode.md).  If [AnimationMode.InAnimationMode](/engine/6000.0/script-reference/unityeditor/animationmode/inanimationmode.md) returns true then [AnimationMode.SampleAnimationClip](/engine/6000.0/script-reference/unityeditor/animationmode/sampleanimationclip.md) can be used to animate the attached object.

**Note:** The script example at [AnimationMode](/engine/6000.0/script-reference/unityeditor/animationmode.md) shows how [AnimationMode.InAnimationMode](/engine/6000.0/script-reference/unityeditor/animationmode/inanimationmode.md) can be used.

## InAnimationMode(AnimationModeDriver)

Checks whether the Editor is in Animation mode.

```csharp
public static bool InAnimationMode(AnimationModeDriver driver)
```

### Parameters

**** (\[AnimationModeDriver]\(/engine/6000.0/script-reference/unityeditor/animationmodedriver)): An [AnimationModeDriver](/engine/6000.0/script-reference/unityeditor/animationmodedriver.md) object that tests if [AnimationMode](/engine/6000.0/script-reference/unityeditor/animationmode.md) has been locked specifically for this driver.

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

### Remarks

[AnimationMode.InAnimationMode](/engine/6000.0/script-reference/unityeditor/animationmode/inanimationmode.md) returns a value of true or false, indicating whether the animation is being controlled by [AnimationMode](/engine/6000.0/script-reference/unityeditor/animationmode.md).  If [AnimationMode.InAnimationMode](/engine/6000.0/script-reference/unityeditor/animationmode/inanimationmode.md) returns true then [AnimationMode.SampleAnimationClip](/engine/6000.0/script-reference/unityeditor/animationmode/sampleanimationclip.md) can be used to animate the attached object.

**Note:** The script example at [AnimationMode](/engine/6000.0/script-reference/unityeditor/animationmode.md) shows how [AnimationMode.InAnimationMode](/engine/6000.0/script-reference/unityeditor/animationmode/inanimationmode.md) can be used.
