UITransition
Optional feature
UITransition is part of UI Transitions. A build includes it only when a scene, prefab or script uses it — see Feature cropping.
From a script
ts
import { UITransitionComponent } from "mmpx";
const uITransition = this.entity.TryGetComponent(UITransitionComponent);Full API: UITransitionComponent.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
ShowshowEffect | "none" | "fade" | "pop" | "zoom" | "slide-up" | "slide-down" | "slide-left" | "slide-right" | "drop" | "pop" | |
HidehideEffect | "none" | "fade" | "pop" | "zoom" | "slide-up" | "slide-down" | "slide-left" | "slide-right" | "drop" | "fade" | |
Durationduration | number (0 … ∞) (s) | 0.3 | |
Delaydelay | number (0 … ∞) (s) | 0 | |
Easeease | "auto" | "linear" | "ease-out" | "ease-in-out" | "back" | "bounce" | "elastic" | "auto" | auto: back for pop, bounce for drop, ease-out for the rest |
Distancedistance | number (0 … ∞) (px) | 200 | How far slides and drops travel |
On StartonStart | "visible" | "hidden" | "show" | "visible" | When the game starts: shown, hidden, or play Show |
When HiddenwhenHidden | "deactivate" | "stay" | "deactivate" | deactivate: the entity goes inactive; stay: active, at its hidden pose |
Idle
| Field | Type | Default | Description |
|---|---|---|---|
EffectidleEffect | "none" | "pulse" | "heartbeat" | "bob" | "float" | "wiggle" | "spin" | "none" | Loops while shown — draws the eye to a button |
SpeedidleSpeed | number (0 … ∞) (/s) | 1 | |
AmountidleAmount | number (0 … ∞) | 1 |