Animatables
  • đŸ•šī¸Getting Started
    • Introducing Animatables
    • Installation
    • Components
      • Animation Data
      • Animation Manager
        • Animation Curve Presets
      • Animatable Transform
      • Animatable UI Objects
    • Easing Curves
  • 📄Scripting Basics
    • Animation Registry
    • Creating Animations
      • Animation Creator
      • Animating Numbers
      • Animating Colors
      • Animating Transform
      • Animating Rect Transform
      • Easing Animations
    • Getting Animations
    • Add or Remove Animations
    • Editing Animations
    • Events
  • đŸ› ī¸Support
    • Getting Help
    • Contact
  • 📚Changelogs
    • Latest Releases
Powered by GitBook
On this page
  1. Scripting Basics
  2. Creating Animations

Easing Animations

PreviousAnimating Rect TransformNextGetting Animations

Last updated 11 months ago

Any animation method will accept an animation curve. Creating animation curves in the usual way can be quite the task (especially with scripting). Which is why Animatables comes with 42 easing curves that are available to you at any time.

Just call the static Ease class and pick an easing option.

For example, here's how we could create a looping elastic move animation for a RectTransform:

private void Start()
{
    var rect = GetComponent<RectTransform>();
    
    // Since this is a RectTransform, the anchoredPosition3D is being used instead of position
    // Animate from (0, 0, 0) to (0, 600, 0) in 1 second with elastic easing (looped)
    rect.Move(Vector3.zero, new Vector3(0, 600, 0), 1, Ease.InOutElastic, 0, true);
}
📄