Skip to content

Tirtstan/DOTween-Flexalon

Repository files navigation

DOTween-Flexalon

A Unity extension that integrates DOTween with Flexalon, providing extension methods for animating Flexalon layout properties.

Features

  • Extension Methods - Familiar API for animating FlexalonObject properties via DOTween.
  • Property Support - Animate Offset, Rotation, Scale, Size, Margin, and Padding.
  • Motion Variants - Standard, Punch, and Shake animations for Offset, Rotation, and Scale.
  • Full DOTween Integration - Returns TweenerCore types, supports AxisConstraint, RotateMode, ShakeRandomnessMode, snapping, and all standard DOTween chaining.

Installation

Add this package to your Unity project via the Package Manager.

1. Set Up DOTween

In your Unity project, install DOTween.

Important

The set up window will automatically show when first installing DOTween, to access it any other time, go to Menu Bar > Tools > Demigiant > DOTween Utility Panel.
In the DOTween setup window, create an Assembly Definition for DOTween.
This ensures the DOTween assemblies can be referenced cleanly from DOTween-Flexalon.

arrow pointing to Create Assembly Definition for DOTween in the set up window.

Install via git...

https://github.com/Tirtstan/DOTween-Flexalon.git

Dependencies:

  • DOTween
  • Flexalon

Usage

using DG.Tweening;
using DG.Tweening.Flexalon;
using Flexalon;

// Animate offset
flexalonObject.DOFlexalonOffset(new Vector3(100f, 0f, 0f), 1f);

// Animate single axis (uses DOTween's AxisConstraint internally)
flexalonObject.DOFlexalonOffsetX(100f, 1f);

// Animate rotation (Euler angles) with RotateMode
flexalonObject.DOFlexalonEulerAngles(new Vector3(0f, 180f, 0f), 1f, RotateMode.FastBeyond360)
    .SetEase(Ease.OutBack);

// Animate rotation (pure Quaternion)
flexalonObject.DOFlexalonRotation(Quaternion.Euler(0f, 90f, 0f), 1f);

// Animate scale
flexalonObject.DOFlexalonScale(Vector3.one * 1.5f, 0.5f)
    .SetEase(Ease.OutElastic);

// Uniform scale
flexalonObject.DOFlexalonScale(2f, 0.5f);

// Punch & Shake (with ShakeRandomnessMode support)
flexalonObject.DOPunchFlexalonOffset(Vector3.up * 20f, 0.5f);
flexalonObject.DOShakeFlexalonScale(0.5f, 0.3f, randomnessMode: ShakeRandomnessMode.Harmonic);

// Size tweens (with snapping support)
flexalonObject.DOFlexalonWidth(2f, 1f, snapping: true);
flexalonObject.DOFlexalonSize(new Vector3(2f, 3f, 1f), 1f);

// Margin & Padding tweens
flexalonObject.DOFlexalonMarginLeft(10f, 0.5f);
flexalonObject.DOFlexalonPaddingTop(5f, 0.5f);

About

A Unity extension that integrates DOTween with Flexalon, providing extension methods for animating Flexalon layout properties.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages