How to turn one character drawing into Idle, Walk and Run sheets for Unity

 This is a how-to for getting a custom character moving in Unity without drawing every animation frame by hand. I'll use Spritix, an AI sprite sheet generator I built, for the generation step. The Unity side is the same if your sheets come from somewhere else.

What you need: a full-body character image (PNG with a plain background works best), Unity 2D set up, and about half an hour the first time.

Step 1: Prepare the source image

Most of the result is decided here.

  • Show the whole body. Cropped feet force the walk cycle to invent contact with the ground.
  • Keep limbs visible. Arms hidden under a cape or a huge weapon leave the model guessing.
  • Use a plain background. Busy scenes confuse edges.
  • Prefer a neutral standing pose, front or three-quarter view.

You do not need a finished final art pass. A clean concept drawing is enough for a prototype sheet.

Step 2: Generate the actions

Open spritix.ai, upload the image, and pick the actions you need. For a side-scroller that usually means Idle, Walk, Run, Jump and Attack. For a top-down prototype you might skip Jump.

After generation, open the loop editor before you export:

  1. Play each action and trim frames that don't belong at the start or end of the loop.
  2. Set speed somewhere between 0.5x and 2x until the motion feels right.
  3. Lock a single frame width and height for every action you plan to use together. Mismatched cell sizes are the main reason a character hops when switching from idle to run in Unity.
  4. Use version history if you over-trim. Editing here is free; regenerating costs credits.

There is a free tier of 20 credits a month, which is enough to practice this pipeline on one or two characters.

Step 3: Export the right files

For Unity, take the sprite sheet PNG. If you also want named frames for a custom importer later, grab Atlas JSON as a backup. The animated GIF is useful for checking the loop in a browser, not for importing. Frames ZIP is for Aseprite or a texture packer workflow.

Step 4: Import into Unity

  1. Drop the PNG into your project (for example Assets/Art/Characters/Hero/).
  2. Select it. In the Inspector set Texture Type to Sprite (2D and UI).
  3. Set Sprite Mode to Multiple.
  4. For pixel art, set Filter Mode to Point (no filter) and compression to None or a lossless option.
  5. Click Sprite Editor → Slice → Grid By Cell Size. Enter the frame width and height you locked in the loop editor. Apply.
  6. You should now see individual sprites under the texture in the Project window.

If the slices look shifted, your cell size is wrong. Fix it at the source and re-export rather than nudging every frame by hand.

Step 5: Build Animation clips

For each action:

  1. Select the sliced frames that belong to that action (for example all walk frames).
  2. Drag them into the Scene view on your character object, or into an empty Animation window. Unity creates an Animation clip and an Animator Controller if you don't have one yet.
  3. Rename the clip to Idle, Walk, Run, and so on.
  4. Open each clip and set the sample rate. Idle often wants fewer samples per second than Run.
  5. For Attack, turn off loop time so the clip can finish and return to Idle.

Wire a simple Animator with parameters such as Speed (float) and Grounded (bool), plus a Trigger for Attack. Transitions from Idle/Walk/Run based on Speed, Jump when Grounded is false, Attack on the trigger with an exit time back to Idle.

Step 6: Quick sanity checks in Play mode

  • Does the character slide left or right inside its own collider when switching animations? That is usually an inconsistent pivot. Keep feet on a shared baseline across actions.
  • Does Walk look like moonwalking? Frame order or speed is off; go back to the loop editor instead of fighting curves in Unity.
  • Does Attack never return to Idle? Loop Time is still on, or the transition has no exit time.

Where a sprite AI tool fits (and where it doesn't)

A sprite AI / sprite generator is a first pass. Attack poses stay generic. Odd source poses produce odd results. Final game art still benefits from a human animator.

Used this way, though, you get a character that moves like your character on day one of a prototype, which is usually enough to decide whether the project is worth more art time.

If you try the pipeline above and something fails at the Unity import step, the usual culprit is frame size. Fix that once at export and the rest of the Animator stays boring in a good way.

Comments

Popular posts from this blog

How to convert a product photo into a printable STL step by step