Sheets and animation

One PNG of frames, then a clip.

A sheet is one picture with every frame on it, in equal cells. WeTools converts that PNG once. The editor slices the cells into sprites, and the Sprite Animator plays them in order.

1. Draw the sheet

Put the frames in a grid. Every cell is the same width and height. Leave a gap between cells only if you mean to: you can tell the slicer about that gap. Read the frames left to right, top to bottom. That is the order they will be named.

2. Convert the whole sheet in WeTools

The sheet is one PNG, so it becomes one .wei. Follow WeTools: open the PNG, turn on Apply palette, pick the method and the color count, then File → Save .wei.

Do this once for the whole sheet. Do not split the PNG into one file per frame.

3. Import the picture

  1. In the editor, Import → Image (.wei)...
  2. Pick the sheet. It is copied to Assets/Images.

Import → Sprite Sheet is a different command. It copies a sprite file you already have (.wspr). It does not slice a PNG. The slice happens in Sprite Maker, after the .wei is in the project.

4. Slice it

  1. View → Sprite Maker.
  2. Drag the .wei from the Project panel onto the window. The hint reads “Drop a .wei image here to slice it into sprites.”
  3. Press Slice by Grid...
  4. Leave Cell size selected. Set Width and Height to the size of one frame. The default is 32 by 32, so change it to your cell.
  5. Green boxes cover the image. If a box cuts a frame, fix the size before you slice. Nothing is written until you press the button.
  6. Press Slice (N cells). N is how many whole cells fit.

Each cell becomes a sprite, a .wspr next to the image. The name prefix starts as frame, so the sprites are frame_0, frame_1, and so on, in reading order. Change Name prefix before you slice when you want run_0 instead. Skip empty cells is on, so a blank cell makes no sprite.

A border around the sheet goes in Offset X and Offset Y. A gap between cells goes in Spacing X and Spacing Y. Columns x rows is the other way to cut: you type how many columns and rows, and the cell size follows the image.

Create Sprites Automatically is for a picture whose frames are separate shapes with empty space between them, not a grid. New Sprite draws one rectangle by hand. A regular sheet uses Slice by Grid.

5. Make the clip

  1. View → Sprite Animator.
  2. Press New Clip.
  3. Type a name, such as run, and press Create.
  4. From the Project panel, drag each frame sprite onto Drop a sprite: add it, in the order they should play.

To add every sprite of the sheet at once, drag the image, or any sprite of it, onto Drop a sheet: add all. They are added in name order, so frame_2 comes before frame_10. The full-image sprite is left out.

Set FPS for the speed. Mode is Loop, Once, or Ping-Pong. Press Play in that window to watch the clip before it is on an object.

6. Save the clip

  1. Press Save As...
  2. The dialog opens in Assets/Animations and stays inside Assets. Save the .wanim there.

A new clip has no file until Save As. After that, the same button is Apply: it writes the clip you already saved. Closing the window with unsaved edits asks first.

7. Play it on an object

  1. Drag the .wanim from the Project panel onto the object in the Hierarchy.
  2. The object gains a Sprite Animator. Play On Start is already on, and the clip is in its list.
  3. Press PLAY in the view toolbar.

The object still needs a picture to draw. If it has no Sprite Renderer yet, use Create → 2D → Animated Sprite, then drop the .wanim on that object. Save the scene when the clip is the one you want to keep.

Next: Prefabs.