Preparing Unity for Pixel Art
Unity is one of the most popular engines for indie game development, and while it started as a 3D engine, its 2D tooling has matured significantly. Before importing any assets, you should configure your Unity project for pixel art from the start. This avoids blurry sprites and scaling artifacts that frustrate many beginners.
Create a new project using the 2D URP template or the standard 2D template. Once the project loads, go to Edit > Project Settings > Quality and set the default quality level. Under the active quality profile, find the Anti-Aliasing setting and set it to Disabled. Anti-aliasing smooths edges on 3D geometry, but it destroys the hard edges that define pixel art. Next, go to Edit > Project Settings > Player and set the default resolution to a clean multiple of your target pixel resolution.
Importing and Configuring Sprite Assets
Create an organized folder structure in your Assets directory. Something like Assets/Sprites/Characters, Assets/Sprites/Tiles, and Assets/Sprites/Effects works well. Download your assets from FreePixel and drag the PNG files into the appropriate Unity folder. Every FreePixel asset is a 200x200 transparent PNG, so Unity will import them as sprites automatically.
Select an imported sprite and look at the Inspector panel. The most important setting is Filter Mode, which you must change from "Bilinear" to "Point (no filter)." Bilinear filtering interpolates between pixels, which blurs your art. Point filtering preserves each pixel as a sharp, distinct square. Also set Compression to "None" to avoid lossy compression artifacts. Set the Pixels Per Unit value based on your game scale. If your game tiles are 200 pixels wide and you want each tile to occupy one Unity unit, set PPU to 200.
For batch operations, you can select multiple sprites and change their import settings at once. If you plan to import many FreePixel assets, consider writing a simple AssetPostprocessor script that automatically applies pixel art import settings to any PNG placed in your Sprites folder. This prevents the common mistake of forgetting to change filter mode on one sprite and spending an hour wondering why it looks blurry.
Sprite Slicing for Spritesheets
If you are working with spritesheet-style assets, Unity's Sprite Editor handles slicing. Select your spritesheet, set the Sprite Mode to "Multiple" in the Inspector, then click "Sprite Editor." In the editor, click "Slice" and choose your slicing method. "Grid By Cell Size" is the most reliable for pixel art since you know the exact dimensions of each frame.
For individual sprites downloaded from FreePixel, slicing is not usually necessary since each asset is a single image. However, if you arrange multiple downloaded sprites into a custom spritesheet using an external tool, the grid slicing method works perfectly. Set the cell size to 200x200 to match the FreePixel asset dimensions, and Unity will carve out each sprite automatically.
After slicing, each sub-sprite gets its own name based on the parent texture name plus an index number. You can rename these in the Sprite Editor for clarity. Well-named sprites make animation setup much faster since you can quickly identify which frames belong to which animation state.
Setting Up Animations with the Animator
Unity uses two components for sprite animation: the Animator component and Animation Clips. Select your character GameObject, then go to Window > Animation > Animation to open the Animation window. With the GameObject selected, click "Create" to make a new Animation Clip. Drag your sprite frames into the Animation timeline in order.
Adjust the sample rate to control animation speed. For pixel art, 8 to 12 samples per second tends to feel right. You can preview the animation directly in the Animation window. Create separate clips for each state like idle, walk, run, and jump. Then open the Animator window and arrange these clips as states with transitions between them.
Set up transition conditions using parameters. Create a float parameter called "Speed" and a bool called "IsJumping." In your player movement script, set these parameters based on input, and the Animator will handle switching between animations. Remember to uncheck "Has Exit Time" on transitions that should be responsive, like going from walk to idle, so the animation switches immediately when the player stops moving.
Configuring the Pixel Perfect Camera
Unity provides a Pixel Perfect Camera component in the 2D URP package. Add it to your main camera to ensure sprites render without sub-pixel distortion. Set the Assets Pixels Per Unit to match your sprite import settings. Set the Reference Resolution to your target game resolution, such as 320x180 for a retro feel or 640x360 for more screen real estate.
Enable "Crop Frame" if you want the camera to only show whole pixels, eliminating the partial-pixel borders that appear when the screen resolution is not an exact multiple of your reference resolution. The Pixel Perfect Camera also provides an "Upscale Render Texture" option that renders at the low reference resolution and upscales the entire frame, which guarantees uniform pixel sizes across the entire screen.
Building a Tile Palette
For level building, Unity's Tilemap system is excellent. Create a Tile Palette by going to Window > 2D > Tile Palette. Create a new palette and drag your tile sprites into it. Unity generates tile assets automatically. You can then paint tiles directly into your scene using the brush, line, rectangle, and fill tools.
Create multiple Tilemap layers for depth. Use a "Background" tilemap for sky and distant scenery, a "Ground" tilemap for walkable surfaces with colliders, and a "Foreground" tilemap for elements that appear in front of the player. Add a Tilemap Collider 2D component to your Ground tilemap and use the Composite Collider 2D to merge individual tile colliders into smooth, continuous collision surfaces.
With your sprites imported, animations configured, camera tuned, and tilemaps painted, you have everything you need for a polished pixel art game in Unity. Browse the FreePixel collections to find asset sets that share a consistent visual style, making your game look cohesive without spending hours matching art from different sources.