This version of Unity is unsupported.

AnimationUtility.GetAnimationClips

Obsolete GetAnimationClips(Animation) is deprecated. Use GetAnimationClips(GameObject) instead.

Declaration

public static AnimationClip[] GetAnimationClips(Animation component);

Declaration

public static AnimationClip[] GetAnimationClips(GameObject gameObject);

Description

Returns the array of Animation Clips associated with the GameObject or component.

This method retrieves Animation Clips from the Animator or the Animation components. This method also works with any component that has implemented the IAnimationClipSource interface.