You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: today's creation surfaces reach the guides, EN + zh
Animation: the Flipbook editor workflow (Create Sprite Animation,
grid slicing, frame strip, Create Animated Sprite, edit-mode viewport
preview), the SpriteAnimator finished flag, and code-free state
switching via the spriteAnim.* built-ins. AI: the new optional action
argument and the four spriteAnim built-ins. Audio: bus effect chains,
sidechain ducking, the Audio Mixer panel + project config, and audio
import settings. Build & export: the Compress Audio package option.
Clips can carry **frame events** (`SpriteAnimEvent`) that fire when playback
66
67
reaches a frame — use them for footstep sounds or hit frames.
67
68
69
+
### Authoring clips in the editor
70
+
71
+
Clips are `.esanim` assets you author visually — no JSON by hand:
72
+
73
+
1.**Right-click a texture** in the Content Browser and choose **Create Sprite
74
+
Animation**. The Flipbook editor opens with the sheet under a slicing grid
75
+
(the cell size is guessed from the image; adjust cell width/height, margin,
76
+
and spacing in the toolbar).
77
+
2.**Click or drag across cells** to append frames. The frame strip below shows
78
+
each frame's thumbnail with an editable duration (ms; empty = `1000 / FPS`),
79
+
drag to reorder, and a live looping preview.
80
+
3.**Save**, then **right-click the `.esanim` → Create Animated Sprite** (or
81
+
drag it into the viewport). You get a `Sprite` + `SpriteAnimator` entity
82
+
posed at frame 0 — it plays in Play mode with zero code.
83
+
84
+
Selecting an animated sprite loops its flipbook **in the viewport while
85
+
editing** (toggle with the Preview FX show flag). If the clip is open in the
86
+
Flipbook editor at the same time, frame edits animate live as you make them.
87
+
88
+
Re-slicing the grid moves every frame consistently — frames reference grid
89
+
cells, not pixel rectangles. Frames that fall outside the current grid are
90
+
flagged red in the strip.
91
+
92
+
### Driving clips from a state machine — no code
93
+
94
+
The [FSM/BT built-ins](/docs/guides/ai/) drive flipbooks as data. An action's
95
+
optional **argument** carries the clip, so idle/run/attack switching is pure
96
+
`.esfsm` on the existing state-machine canvas:
97
+
98
+
| Name | Kind | Description |
99
+
|---|---|---|
100
+
|`spriteAnim.play`| action | Play. With a clip argument, switch to that clip (rewinds to frame 0). Safe on `onUpdate` — same-clip play while playing is a no-op. |
101
+
|`spriteAnim.restart`| action | Unconditional rewind + play (re-trigger a one-shot mid-flight). |
102
+
|`spriteAnim.stop`| action | Pause playback. |
103
+
|`spriteAnim.finished`| condition | True once a one-shot clip completed — `onEnter: spriteAnim.play` + a `spriteAnim.finished` transition is a self-contained attack state. |
104
+
105
+
68
106
## Tweens
69
107
70
108
The `Tween` resource interpolates a property from one value to another over a
0 commit comments