> For the complete documentation index, see [llms.txt](https://espergames.gitbook.io/animatables/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://espergames.gitbook.io/animatables/scripting-basics/getting-animations.md).

# Getting Animations

## From an Animatable

You can get an animation from any Animatable component.

### Animatable UI Objects

You can get the on enable, on disable, or custom call animations of any AnimatableRectTransform, AnimatableImage, AnimatableCanvasGroup, AnimatableText, and AnimatableButton by index.

```csharp
// Getting the first animation of each animation type
// 'animatable' is any AnimatableUIObject
UIAnimationData enableAnim = animatable.onEnableAnimations[0];
UIAnimationData disableAnim = animatable.onDisableAnimations[0];
UIAnimationData customCallAnim = animatable.customCallAnimations[0];
```

### Animatable Transform

Animatable transforms only consist of a single list of animations. Similar to the animatable UI objects, you can get the animation by index.

```csharp
// Getting the first animation
// 'animatable' is an AnimatableTransform
TransformAnimationData anim = animatable.animations[0];
```

## From the Animation Creator

When an animation is created by any Animation Creator extension (such as `transform.Move`, `rectTransform.Rotate`, etc.), the created animation is returned. So, you can get the animation by simply creating a variable for it.

```csharp
// 'number' is a float
AnimationData anim = AnimationCreator.FloatAnimation(0, 100, (x) => number = x, 1);
```
