# GetAnimationClips

> Retrieves an array of animation clips associated with a GameObject or component. GetAnimationClips(Animation) is obsolete and has been replaced with GetAnimationClips(GameObject).

## Definition

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

## GetAnimationClips(Animation)

Retrieves an array of animation clips associated with a GameObject or component. `GetAnimationClips(Animation)` is obsolete and has been replaced with `GetAnimationClips(GameObject)`.

> **Warning:**
>
> **Deprecated.** GetAnimationClips(Animation) is deprecated. Use GetAnimationClips(GameObject) instead.

```csharp
public static AnimationClip[] GetAnimationClips(Animation component)
```

### Parameters

**** (\[Animation]\(/engine/6000.0/script-reference/unityengine/animation)):&#x20;

### Returns

| Type             | Description |
| ---------------- | ----------- |
| AnimationClip\[] |             |

### Remarks

This method retrieves animation clips from the [Animator](/engine/6000.0/script-reference/unityengine/animator.md) or [Animation](/engine/6000.0/script-reference/unityengine/animation.md) component. This method works with any component that has implemented the [IAnimationClipSource](/engine/6000.0/script-reference/unityengine/ianimationclipsource.md) interface.

## GetAnimationClips(GameObject)

Retrieves an array of animation clips associated with a GameObject or component. `GetAnimationClips(Animation)` is obsolete and has been replaced with `GetAnimationClips(GameObject)`.

```csharp
public static AnimationClip[] GetAnimationClips(GameObject gameObject)
```

### Parameters

**** (\[GameObject]\(/engine/6000.0/script-reference/unityengine/gameobject)):&#x20;

### Returns

| Type             | Description |
| ---------------- | ----------- |
| AnimationClip\[] |             |

### Remarks

This method retrieves animation clips from the [Animator](/engine/6000.0/script-reference/unityengine/animator.md) or [Animation](/engine/6000.0/script-reference/unityengine/animation.md) component. This method works with any component that has implemented the [IAnimationClipSource](/engine/6000.0/script-reference/unityengine/ianimationclipsource.md) interface.
