【Unity】Unity 2D Development: Mastering Sprites and Sprite Sheets

Created: 2025-12-07

Sprites are the foundation of 2D game visuals. Learn about sprite sheets that combine multiple images into one, and how to efficiently slice them using the Sprite Editor.

Overview

2D game worlds are built with image assets called Sprites. Characters, backgrounds, items, UI elements—virtually all on-screen graphics are Sprites. Unity provides powerful tools for efficiently managing and displaying these 2D images.

When dealing with multiple sequential images like character animations, managing them as individual files is inefficient. Instead, we use Sprite Sheets (or Texture Atlases)—techniques that pack multiple images into a single large texture. This provides major benefits: reduced draw calls (better rendering performance) and simplified asset management.

This article covers the basics of handling Sprites in Unity and how to slice sprite sheets using the Sprite Editor for animations.

Sprite sheet example: Slime animation

The image above shows a sprite sheet for slime character animation. Animation frames are arranged in a single image like this.

What is a Sprite?

When you import image files (PNG, JPEG, etc.) into a Unity project, the default Texture Type is Default (3D texture). To use it as a 2D Sprite, you need to change the settings in Inspector.

  1. Select the image asset in the Project window.
  2. Change the Texture Type dropdown at the top of Inspector to Sprite (2D and UI).
  3. Click Apply to apply the changes.

The image asset is now a Sprite that can be dragged into the scene. Sprites placed in scenes are rendered by the Sprite Renderer component.

Sprite Sheets and Sprite Editor

Sprite sheets are single images containing sequential frames of character movements—walking, running, jumping—arranged like film frames. To use sprite sheets in Unity, you need to slice them into individual images using the Sprite Editor.

How to Slice with Sprite Editor

  1. Change Sprite Mode: Select the image asset you want to use as a sprite sheet. In Inspector, change Sprite Mode from Single to Multiple.

  2. Open Sprite Editor: Click the Sprite Editor button to open the Sprite Editor window.

  3. Automatic Slicing:

    • Click the Slice menu at the top-left of Sprite Editor.
    • Ensure Type is set to Automatic, then click Slice.
    • Unity analyzes transparent areas and automatically detects individual sprites, surrounding them with rectangles.
  4. Grid Slicing (Grid by Cell Size):

    • When sprites are neatly arranged in a uniform grid, precise grid slicing is more convenient.
    • Change Type to Grid by Cell Size in the Slice menu.
    • Enter the width and height (in pixels) of each sprite in Pixel Size, then click Slice.
  5. Manual Adjustment: If automatic slicing doesn't work well, you can drag to create/edit rectangles manually. You can also set individual sprite names and pivots (center points).

  6. Apply: When finished slicing, click Apply at the top-right of Sprite Editor to save changes. Forgetting this step loses all slicing information.

After clicking Apply, clicking the arrow next to the sprite sheet asset in Project window reveals the sliced individual sprites as child assets. Use these individual sprites for creating animation clips or assigning to Sprite Renderer.

Why Use Sprite Sheets?

  • Performance improvement: When multiple Sprites share the same texture (sprite sheet), Unity tries to render them in a single draw call (static/dynamic batching). This significantly reduces CPU load and improves overall game performance.
  • Easier management: Combining related images into one file simplifies project asset management. Fewer files also reduces project load times.
  • Memory efficiency: Loading one large image is more memory-efficient (less fragmentation) than loading many individual image files.

Summary

Sprites and sprite sheets are fundamental to Unity 2D game development.

  • Set Texture Type to Sprite (2D and UI) for 2D images.
  • Combine sequential images into sprite sheets for performance and management benefits.
  • Set Sprite Mode to Multiple and slice with Sprite Editor.
  • Slicing options include Automatic and Grid by Cell Size—use appropriately for your situation.

Mastering the Sprite Editor for efficient sprite sheet management is the first step toward creating high-quality 2D games.