Animation
Animated Container
A sequential animation component
Overview
Animated Container animates several objects one after another when the object becomes enabled. It can detect child objects and apply scale and fade animations, making it useful for clean UI reveals.
Usage
Select a UI parent object
Add the Animated Container component
Customize options if needed
Properties
| Name | Type | Description |
|---|---|---|
animationCurve | AnimationCurve | Easing curve for scale animation progression |
animationDelay | float | Initial delay before starting animations |
startScale | float | Sets the object's initial animation scale |
scaleDuration | float | How long the scaling animation lasts |
fadeAfterScale | float | Start fade-in transition after the specified transform scale |
fadeDuration | float | How long the fade animation lasts |
useUnscaledTime | bool | Use unscaled time for animations (ignores Time.timeScale) |
playOnce | bool | Play animation only once, ignore subsequent triggers |
itemCooldown | float | Delay between starting each child animation |
Public Methods
| Name | Parameters | Description |
|---|---|---|
Animate() | None | Trigger the animation sequence manually |
Code Example
using UnityEngine;
using Evo.UI;
public class AnimatedContainerExample : MonoBehaviour
{
public AnimatedContainer animatedContainer;
void YourMethod()
{
// Configure animation timing
animatedContainer.animationDelay = 0.4f;
animatedContainer.itemCooldown = 0.12f;
// Configure scale animation
animatedContainer.startScale = 0.4f;
animatedContainer.scaleDuration = 0.3f;
// Configure fade behavior
animatedContainer.fadeAfterScale = 0.35f;
animatedContainer.fadeDuration = 0.25f;
// Playback settings
animatedContainer.useUnscaledTime = false;
// Trigger animation manually
animatedContainer.Animate();
}
}