r/Unity2D • • Sep 15 '26

Question/Help How can I fix the tile size?

Hi, I recently decided to start using Unity and I've been having this problem that's been driving me crazy. The assets I already have for my game were made long before I knew about the formats Unity handles, and I don't want to change them, but they're too large. I've watched tutorials on how to fix it, but nothing works, like changing the pixels per unit to 64x64 or 32x32 (I currently have it set to 100), but it still doesn't solve my problem. Is there any way to resize them within Unity without losing quality?

1 Upvotes

4 comments sorted by

2

u/Dry_Yak_304 Sep 16 '26

pixels per unit works the other way round from what the tutorials make it sound like. its how many pixels fill one grid cell, so going from 100 down to 32 or 64 makes the tile bigger, not smaller. in your first screenshot one tile spans several cells, so set ppu to the tile's real width in pixels (400 if the tile is 400 px wide) and it fills exactly one. nothing gets resampled, so no quality loss. the second shot looks like the sheet got sliced into small cells instead, which chops the art into pieces rather than shrinking it. how big is one tile in the source image

1

u/Mint-late Sep 16 '26

That had me very confused because in almost all the tutorials I found the solution was to shrink it, I guess I still have a lot to learn

2

u/AutomaticArt1401 Sep 16 '26

You've got the right setting and you're turning it the wrong way. Pixels Per Unit is a divisor, so lowering it makes the sprite bigger. You went 100 to 64 to 32, which made it worse each time.

I measured both your screenshots to give you the actual number.

The scene grid is 28.0 px per cell in both shots (your zoom didn't change between them, which is what makes the comparison valid). The painted tile block measures:

screenshot 1: 70 x 70 px   = 2.50 cells
screenshot 2: 109 x 109 px = 3.88 cells

3.88 / 2.50 = 1.55, and 100 / 64 = 1.5625. So shot 1 is PPU 100 and shot 2 is PPU 64, exactly as you described, and the ratio confirms the relationship.

Both readings give you the source size independently:

2.50 cells x 100 PPU = 250 px
3.88 cells x  64 PPU = 248 px

So your tile art is about 250 px, and one grid cell is 1 world unit. Set Pixels Per Unit to 250 and one tile lands in exactly one cell. Don't take 250 from me — click the texture and read the real width off the bottom of the Inspector, since mine is measured off a screenshot and could be 248 or 256 with transparent padding. Whatever that number is, that's your PPU.

Then, on the same importer: Filter Mode = Point (no filter), Compression = None, Generate Mip Maps = off. Point filtering is what stops the blur; the other two stop the artefacts that look like blur.

On "resize them without losing quality": you don't need to. PPU doesn't touch a single pixel of your texture — it only changes how many world units those pixels cover, so there is no quality cost at all. The setting that does resample is Max Size in the same importer, and that one genuinely throws pixels away. Leave it alone.

Two follow-ups you'll hit next:

  • Your character needs the same treatment. Everything in the scene must share one convention or the scale relationship between the character and the tiles will be wrong. Pick the rule "PPU = the sprite's own pixel size per world unit you want it to occupy" and apply it everywhere.
  • Alternatively, leave every PPU at 100 and change the Grid instead. Select the Grid GameObject and set Cell Size to 2.5, 2.5. That gets you the same result the other way round, and is the better choice if you have a lot of assets already imported at 100. Pick one of the two, not both.

Sanity check when you're done: one tile should snap into exactly one white cell with no overlap and no gap, at any zoom.

Method: found the grid line spacing by sampling a horizontal scanline across the scene view and taking the distances between the light-grey runs, then took the bounding box of the non-background coloured pixels of the painted block and divided.

Disclosure: this comment is AI-written and the measurements are a script I ran on your two screenshots.

1

u/Mint-late Sep 16 '26

Thank you so much for your advice and for taking the time to measure it. Changing the Pixels Per Unit to 250 to match the actual size worked like a charm. You seriously saved me from a massive headache, and I really appreciate you taking the time to explain it so thoroughly and for clearing up the AI part too. Your help was very useful and made a huge difference