Evo UI
Animate UI interaction states, component sequences, and Procedural Shapes
Overview
Evo Tween works with Evo UI's animation sequences, interaction states, and Procedural Shapes. The integration module adds shape bindings and connects Tween Animator to components that implement IStylerInteractable.
Animate Interaction States
Use an Interaction trigger when the animation should follow an Evo UI control's state, including keyboard selection and disabled feedback.
Add Tween Animator to the object that owns the animation.
Add a state such as Highlighted, and set Trigger to Interaction.
Assign an Evo UI Button or another compatible control to Interaction Source.
Select the Interaction States that should play this animation.
Add clips for the desired response, then add a Normal state to return to the resting appearance.
For example, a Highlighted state can scale a visual child to 1.05, and a Normal state can return it to 1. Enable From Current to avoid snapping when the pointer leaves partway through the animation.
Use Restart On Trigger to decide whether selecting the current state again should replay it. When multiple states match an interaction, the first one in the state list wins.
The source must implement Evo.UI.IStylerInteractable. A standard Unity UI Button doesn't provide that interface; use Pointer Event triggers or call the state from its events instead.
Edit a Component's Sequences
Evo UI components with custom animations expose Tween Sequences directly. Select the component, open Tools -> Evo Tween -> Tween Timeline, and choose the sequence you want to edit.
The owning component decides when that sequence plays. You don't need another Tween Animator just to edit a sequence already owned by the component.
You can share animations with Sequence Presets. Bind each consumer's targets locally, and check those bindings after changing the preset's clip order.
Procedural Shape Bindings
Use EvoTween.Create(...) with the following bindings on a ProceduralShape. The extension methods are in Evo.Tween; the component is in Evo.UI.
| Area | Bindings |
|---|---|
| Shape | BindToPolygonSides, BindToShapeAngle, BindToShapeSkew, BindToClipAmount, BindToSoftness |
| Fill | BindToFillColor, BindToFillAlpha, BindToFillGradientAngle, BindToFillGradientZoom |
| Pattern geometry | BindToPatternPolygonSides, BindToPatternRadius, BindToPatternSize, BindToPatternGap, BindToPatternOffset, BindToPatternAngle |
| Pattern falloff | BindToPatternFalloffOrigin, BindToPatternFalloffStart, BindToPatternFalloffEnd |
| Pattern appearance | BindToPatternColor, BindToPatternAlpha, BindToPatternGradientAngle, BindToPatternGradientZoom |
| Outline geometry | BindToOutlineWidth, BindToOutlineDashLength, BindToOutlineDashGap, BindToOutlineDashOffset |
| Outline appearance | BindToOutlineColor, BindToOutlineAlpha, BindToOutlineGradientAngle, BindToOutlineGradientZoom |
| Corners | BindToCornerRadius with a float for uniform corners or a Vector4 for individual corners |
| Inner shadow | BindToInnerShadowOffset, BindToInnerShadowSize, BindToInnerShadowSoftness, BindToInnerShadowColor, BindToInnerShadowAlpha, BindToInnerShadowGradientAngle, BindToInnerShadowGradientZoom |
| Outer shadow | BindToOuterShadowOffset, BindToOuterShadowSize, BindToOuterShadowSoftness, BindToOuterShadowColor, BindToOuterShadowAlpha, BindToOuterShadowGradientAngle, BindToOuterShadowGradientZoom |
Colors use Color; polygon counts use int; skew, pattern size/gap/offset/falloff origin, and shadow offsets use Vector2. Other scalar properties use float, except the individual-corner overload described above.
Configure the corresponding shape feature before animating it. Changing an outline width or shadow offset only produces the intended result when that feature is enabled and visible.
using UnityEngine;
using Evo.UI;
using Evo.Tween;
public class ShapeHighlight : MonoBehaviour
{
[SerializeField] private ProceduralShape shape;
[SerializeField] private Color normal = Color.white;
[SerializeField] private Color highlighted = Color.cyan;
private TweenHandle tween;
public void PlayHighlight()
{
tween = EvoTween.Create(normal, highlighted, 0.2f)
.WithTimeMode(TimeMode.Unscaled)
.BindToFillColor(shape);
}
private void OnDisable() => tween.Kill();
}If Styler or another animation also writes a shape property, give that property one owner during the transition. For motion, animating a child visual is often convenient when the parent also handles layout or interaction.