Pixels Per Unit, Explained for 2D Games
What pixels per unit means, how it sets sprite size and camera size, how to pick one PPU for a whole project, and what Godot and GameMaker do instead.
Pixels Per Unit (PPU) is a sprite import setting in Unity. It answers one question: how many pixels of this image equal one unit of distance in the game world? A 260 px tall sprite at PPU 100 is 2.6 units tall. The same sprite at PPU 260 is exactly 1 unit tall.
The practical answer is short. Pick one PPU for the whole project, set every sprite to it, and choose the number so your world is easy to reason about: the tile size for pixel art (16 or 32), or a value that makes your main character a tidy number of units tall for higher-resolution art. Godot and GameMaker do not have a PPU setting because they measure the 2D world in pixels already.
Here is how PPU affects sprite size, camera size and physics, and how to choose it.
The formula
Everything about PPU follows from one division:
world size in units = size in pixels / PPU
Take a character whose sprite sheet cells are 260 px tall. Here is how tall it is in the world at common PPU values:
| PPU | Height in units | What it implies |
|---|---|---|
| 16 | 16.25 | Typical pixel-art PPU; this sprite would be huge next to 16 px tiles |
| 32 | 8.125 | Also pixel-art scale; still very large |
| 100 | 2.6 | A common starting value for high-resolution art |
| 130 | 2.0 | Character is exactly 2 units tall |
| 260 | 1.0 | Character is exactly 1 unit tall |
Nothing about the image changes between rows. Only its size in the world does. That is why PPU must be consistent: if two sprites are drawn at the same pixel scale but imported at different PPU values, they appear at different sizes side by side.
Unity defines the setting on the sprite texture import settings as the number of pixels of width or height in the sprite image that correspond to one distance unit in world space. Unity's own pixel-perfect guidance repeats the rule: set all sprites to the same Pixels Per Unit value.
Why PPU matters beyond sprite size
Speeds, gravity and jump heights are in units. A movement speed of 5 means 5 units per second, not 5 pixels. Change the PPU after tuning and every movement value now feels different on screen, because the sprites shrank or grew while the numbers stayed the same.
Camera size is in units. An orthographic camera's size is half the height of what it sees, in world units. The horizontal size follows from the screen's aspect ratio.
Snapping is in units. To snap objects to whole pixels in the editor, Unity's 2D Pixel Perfect documentation says to set the Move X/Y/Z snap values to 1 divided by the PPU. At PPU 100 that is 0.01; at PPU 16 it is 0.0625.
Matching the camera to the PPU
To show a specific number of art pixels on screen vertically, set the orthographic size to:
orthographic size = vertical pixels to show / (2 x PPU)
| Target vertical view | PPU | Orthographic size | Visible height in units |
|---|---|---|---|
| 1080 px (full HD art) | 100 | 5.4 | 10.8 |
| 1080 px | 130 | about 4.15 | about 8.3 |
| 360 px (pixel art, 3x to 1080p) | 16 | 11.25 | 22.5 |
| 180 px (pixel art, 6x to 1080p) | 16 | 5.625 | 11.25 |
If your art is pixel art, the camera should show a resolution that divides evenly into the screen, so each art pixel maps to a whole number of screen pixels. Unity's Pixel Perfect Camera component handles that for you: set its Asset Pixels Per Unit to match your sprites' PPU, set Reference Resolution to the resolution your art is designed for (for example, 320 x 180), and it computes the camera for you. Its Grid Snapping option can snap sprites to the pixel grid or render to a low-resolution texture and upscale it.
A correct PPU does not guarantee crisp pixels on its own. Texture filter mode and non-integer scaling matter just as much, so check those next if the art looks soft.
How to choose a PPU
There is no single correct value. There is a correct process: pick a number that makes your own math easy, then never mix it.
| Art style | Good PPU choice | Reasoning |
|---|---|---|
| Pixel art on a tile grid | The tile size (8, 16, 32) | One tile equals one unit, so level layout and movement speeds are in tiles |
| High-resolution art, side view | A value that makes the main character 1 or 2 units tall | Jump heights and speeds read as "character heights" |
| High-resolution art, top-down | Your floor tile or grid size in pixels | One grid cell equals one unit |
| Mixed resolution (backgrounds, characters, props) | One PPU for everything in the world | Lay out UI with your UI system's own scaling |
For the 260 px character above, PPU 130 makes it exactly 2 units tall. For a cast sized to a 230 px reference, as Cal Voss was in Wayfarer's Hearth, PPU 115 makes every cast member 2 units tall.
Two rules of thumb hold regardless of the number:
- Draw everything at the same pixel scale. PPU only keeps sizes consistent if the art was made at a consistent scale. A background painted at 2560 x 1440 and characters drawn for a 1920 x 1080 frame need a decision about which is the reference. Background resolution and file size and character scale relationships cover that decision.
- Decide before tuning gameplay. Every speed, jump and camera value depends on it.
Changing PPU on an existing project
If your sprites are already at mixed values, here is the cleanup:
- List every texture and its PPU. In the Project window, select textures one folder at a time and check the import settings.
- Pick the target value using the table above.
- Multi-select and set. Select all textures of the same kind, set Pixels Per Unit once, and Apply.
- Recheck pivots. PPU changes size, not pivots, but a size change exposes pivot mistakes that were hidden. Sprite pivot points explains what each should be.
- Retune the camera with the formula above.
- Retune movement. Speeds and jump heights were in units, so they now feel different. Scale them by the ratio of old PPU to new PPU.
If one character grew or shrank between animations before you started, that is usually this exact problem: one sheet at a different PPU. See why your character changes size between animations.
What Godot and GameMaker do instead
Godot 4 has no PPU setting in 2D. One unit is one pixel. The project's base viewport size (default 1152 x 648) defines how many pixels of the world fit on screen, and the stretch mode decides how that view scales to the window. With the stretch mode set to disabled, the project settings reference puts it plainly: one unit in the scene corresponds to one pixel on the screen. Even physics is in pixels: the default 2D gravity is 980 pixels per second squared, and CharacterBody2D.velocity is in pixels per second. To make art bigger or smaller you change the art's pixel size, the node scale, or the camera zoom.
GameMaker also works in pixels. An instance's x is its horizontal position in the room, measured in pixels. Sprite size on screen is set by the sprite's pixel dimensions, any scale you apply to the instance, and the camera and viewport sizes.
That makes the core rule even simpler in those engines: draw at the size you want to display, and avoid per-object scale except for deliberate effects.
Doing this in Makko
In Code Studio, the Asset Manager right-sizes characters against a reference animation, so a cast shares one pixel scale before you import it. That is the precondition PPU needs: once every character is drawn at the same pixel scale, a single PPU value in Unity keeps them the same relative size in the world. In Godot or GameMaker, the same right-sizing means you can leave node scale at 1.
FAQ
What does pixels per unit mean in Unity?
It is the number of pixels in a sprite image that equal one unit of distance in the game world. A 100 px tall sprite at PPU 100 is 1 unit tall; at PPU 50 it is 2 units tall. It is set per texture in the import settings.
What PPU should I use for pixel art?
Use your tile size, usually 16 or 32. That makes one tile equal one unit, so level layout, movement and camera math are all in tiles. Use the same value on every sprite and set the Pixel Perfect Camera's Asset Pixels Per Unit to match.
Why are my sprites different sizes in Unity when they were drawn at the same scale?
They were imported with different Pixels Per Unit values. Check each texture's import settings and set them all to the same value. Then check that no object or animation clip is applying its own scale.
Does Godot have pixels per unit?
No. Godot's 2D world is measured in pixels, so one unit equals one pixel. You control how much of the world is visible with the base viewport size, the stretch settings and the camera zoom.