Skip to content

Animation asset files

What each animation-related asset actually holds, and what you can configure for it — sprite sheets, clips, and controllers. See Getting started for how they fit together, and Editors for the visual tools that author them.

Sprite sheet (.jsprite)

Names the rectangles of an image so clips can ask for "walk_0" instead of pixel coordinates. Use the Sprite Sheet editor to slice one visually.

Placeholder: the Sprite Sheet editor, showing an image sliced into named frames

Set the Cell Width/Cell Height to match your image's grid and click Slice to name every cell automatically (frame0, frame1, and so on). Frames don't have to be a neat, even grid — a hand-packed image (frames of different sizes, tightly arranged to save space) works too, just not through the grid slicer.

Names are what clips look for, so renaming a frame means updating the clips that use it.

Clip (.janim)

One piece of motion, made of tracks. The Timeline panel shows a clip's length and tracks.

Placeholder: the Timeline panel, showing a clip's tracks and keyframes

Keyframes are hand-authored for now

Joystick doesn't have a visual keyframe editor yet — a clip's individual keyframes (which frame plays when, or a moving/rotating value over time) are entered directly in the clip rather than dragged into place. Getting started walks through building one.

Playback is time-based, so a clip runs at the same speed whatever frame rate the game is drawing at.

A track can target the entity carrying the Animator itself, or a named child entity — useful for a cutout rig (a parented hierarchy of sprites where each track rotates or repositions one limb). A child name that doesn't match anything in the Scene Hierarchy is reported once in the Log panel; the rest of the clip keeps playing.

Sprite tracks

Swaps which frame is showing at different points in the clip, so uneven timing is easy — hold a wind-up frame, then flash three quick ones. The target entity needs a Sprite Renderer carrying the same image the sheet describes.

What can be animated

A track can move, rotate, scale, or fade an entity:

It can animateWhat it does
PositionMoves the entity
RotationRotates it
ScaleResizes it
ColorTints it
TransparencyFades it in or out

Anything else isn't animatable yet — an unrecognized target is noted once in the Log panel and skipped.

Motion between keyframes is either smooth (the usual choice) or an instant snap between values — eased motion isn't available yet; for something close to easing, bunch a few extra smooth keyframes toward the start and end of the move.

Values are absolute, not offsets — a clip that animates position owns that position while it plays, overriding whatever you'd set in the Inspector.

Event tracks

Clips can carry named markers that call a method on your entity's script at a specific point in the clip — see Scripting for how to receive one. A misspelled or missing method name is reported once in the Log panel; the clip keeps playing regardless.

Controller (.janimator)

Decides which clip plays. Use the Animator editor to build one visually — states, transitions, and conditions, laid out as tables.

Placeholder: the Animator editor, showing states, transitions, and conditions as tables

The simplest controller is one state playing one clip, marked as the Default State — that's all a flipbook needs. Each state also has its own speed multiplier, so the same clip can play faster or slower in different states without duplicating it.

Controllers can also hold parameters (values your script sets — see Scripting) and transitions between states, each with conditions that test those parameters. A transition can blend smoothly into the new state over a short duration, and can optionally wait until the current clip has finished playing before it's allowed to fire — the way to let a one-shot animation, like an attack, finish before anything can interrupt it.

Animator component

Add one via Add Component → Animator in the Inspector.

  • Controller — drag a .janimator onto the slot, or right-click to reset it to none
  • Play On Start — whether the animator starts running immediately; off starts it paused, resumable from a script's Resume()
  • Speed — multiplier on top of the state's own speed; 0 freezes it
  • Preview In Editor — animates the entity in the viewport without pressing Play. Off by default because it overwrites the entity's authored position while it's on; turning it back off restores exactly what was there before

The Edit Animator button opens the Animator editor on the assigned controller.

See also

Two API Reference topics come up often once a controller's parameters and transitions are wired up to real gameplay:

  • Physics2D — a transition condition is only useful once something is actually setting its parameter each frame; a ground check (Physics2D.Raycast) is the usual way to drive a Grounded-style parameter for a jump/land transition.
  • Session — if which controller (or which state) an entity should start in depends on something decided earlier — which weapon is equipped, say — Session is the recommended way to carry that value across a scene change so it's still there when the new scene's Animator reads it.