Unity Sprite Import Guide
Getting Your Sprites Into Unity
Importing sprites into Unity is one of the first things every 2D game developer needs to master. Whether you are working with a sprite sheet generated by an AI tool or hand-crafted pixel art, the Unity sprite import workflow gives you fine-grained control over how your assets appear in-engine. This guide covers every step from dropping an image into your project to running a smooth walk cycle in the Game view.
The unity sprite import process starts in the Project window. Drag your PNG file into the Assets folder (or any subfolder you prefer). Unity immediately begins importing it using default settings, but those defaults rarely match what game developers need.
Setting the Texture Type to Sprite (2D and UI)
After the file appears in your Project window, click on it to open the Import Settings in the Inspector. The most critical setting is Texture Type. By default Unity may set this to Default, which treats the image as a generic texture. Change it to Sprite (2D and UI).
With Sprite (2D and UI) selected, a new set of options appears:
- Sprite Mode - Single for one sprite per image, Multiple for sprite sheets
- Pixels Per Unit - How many pixels correspond to one Unity world unit. For pixel art at 16x16, try 16. For larger art at 64x64, try 32 or 64.
- Filter Mode - Use Point (no filter) for crisp pixel art. Bilinear or Trilinear works better for high-resolution art.
- Compression - Set to None for pixel art to avoid color degradation. For high-res sprites, use Compressed to save memory.
Click Apply at the bottom of the Inspector after making changes. Unity will re-import the asset with the new settings.
Using the Sprite Editor to Slice a Sprite Sheet
If your image contains multiple animation frames laid out on a grid (a sprite sheet), set Sprite Mode to Multiple and then click the Sprite Editor button. This opens the Sprite Editor window.
In the Sprite Editor, click the Slice dropdown in the top-left corner. You have three main slicing options:
- Automatic - Unity detects sprites by finding non-transparent regions. Works well for sheets with spacing between frames.
- Grid By Cell Size - Specify the exact pixel width and height of each frame. Best when all frames are the same size, which is typical for animated sprites.
- Grid By Cell Count - Specify how many columns and rows the sheet has. Unity divides evenly.
For a character sprite sheet with 8 columns and 4 rows of 32x32 pixel frames, use Grid By Cell Size with Width 32 and Height 32. Click Slice, then check that each frame has its own bounding box. Adjust any misaligned frames by dragging their handles manually. When satisfied, click Apply in the top-right corner of the Sprite Editor.
Back in the Project window, click the arrow next to your sprite sheet to expand it. You will see all the individual sprite frames listed underneath, named automatically as YourSheet_0, YourSheet_1, and so on.
Creating Animation Clips in Unity
With your frames sliced, select them all in the Project window (click the first, shift-click the last). Then drag them directly into the Scene or Hierarchy view onto your GameObject. Unity will prompt you to save a new Animation Clip. Name it something descriptive like Player_Walk and save it in your Animations folder.
Unity automatically creates three things: an Animator Controller, an Animation Clip, and an Animator component on your GameObject. Open the Animation window (Window > Animation > Animation) to review the clip. You should see each sprite frame listed as a keyframe on the Sprite property track.
Adjust the Samples field in the Animation window to control playback speed. For pixel art character walk cycles, 8 to 12 frames per second is a common starting point. A run cycle typically runs faster at 12 to 16 fps. Experiment until the motion feels right.
Configuring the Animator Controller
The Animator Controller manages which animation plays and when. Double-click the Controller asset to open the Animator window. You will see your first animation clip (often set as the default state in orange). Additional states can be added by right-clicking the Animator grid and choosing Create State > Empty, then assigning a clip in the Inspector.
Transitions between states are triggered by Parameters. Common parameter types for 2D character controllers:
- Bool - isGrounded, isRunning, isAttacking
- Float - Speed (drive blend trees for walk/run)
- Trigger - Jump, Attack (fire once)
Create a transition by right-clicking a state and choosing Make Transition, then clicking the destination state. In the Inspector, set the condition. For example: transition from Idle to Walk when Speed is greater than 0.1. Uncheck Has Exit Time for snappy response to input, or keep it checked if you want the current animation to finish before transitioning.
Pivot Points and Sprite Sorting
Before wrapping up, check the pivot point of each sprite. The pivot determines where the sprite is positioned relative to the GameObject's transform. For characters, the bottom-center pivot is standard so the character stands on the ground. In the Sprite Editor, use the Pivot dropdown to choose a preset or drag the pivot point manually.
If you have multiple sprites overlapping in the scene, use Sorting Layers and Order in Layer on each Sprite Renderer component to control which sprite renders on top. Set up layers like Background, Midground, Character, and UI in Project Settings > Tags and Layers.
Performance Tips for Unity Sprite Import
- Pack multiple sprites into texture atlases using Unity's Sprite Atlas (Window > 2D > Sprite Atlas) to reduce draw calls
- Keep sprite sheet dimensions as powers of two (256x256, 512x512, 1024x1024) for GPU optimization
- Use Crunch compression for sprites that are not pixel art to reduce build size significantly
- Set Max Texture Size per platform in the Import Settings platform overrides tab
Bringing It All Together
Once your animations are set up, connect them to your character controller script using GetComponent<Animator>() and set parameter values with animator.SetFloat(), animator.SetBool(), or animator.SetTrigger(). With clean sprite import settings and a well-organized Animator Controller, your character sprites will move smoothly and respond instantly to player input.
Need game-ready sprites to import? Use our AI Sprite Generator to create pixel art characters and sprite sheets in seconds. Export directly to transparent PNG, then follow this guide to get them running in your Unity project today. You can also convert existing reference art using our image-to-sprite tool.