Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+7)

For anyone having troubles importing larger sprite sheets into Unity, here is what worked for me for pixel perfect results. 

Of course, when you import the image, you should select "Point (no filter)" for your "Filter Mode" and "None" for "Compression". But some of these files exceed the "Max Size" limit, which means the tiles still get compressed and you get some funny pixel behaviour where some of the pixels extend beyond the expected boundaries of your grid. 

When importing, take note of the file's actual pixel dimension in the preview window. For me, I was working with one that is 1152x2640 but was showing 894x2048 in the preview window (maxxed out one side to 2048 which is the "Max Size" limit).  

Here is the preview window in the inspector when you have the image selected:


I increased the Max Size to 4096 and the dimensions then matched the expected dimensions after I hit "apply".


When using this image in the pallette, everything is perfect (don't forget to slice it if you have not already).  


Here is an example of before and after:

Notice the spilling over of pixels above? With max size too low, this means the actual individual tiles have been compressed to 37x37, and then expanded up to 48x48 causing the mess around the edges.

With the Max Size increased to 4096, the individual tiles are now the expected 48x48 so no messed up edges or artifacts. If you increase the size to 4096 and it's still broken, double check the dimensions of your source file and the preview to see if they match, and if they don't, increase your size again. Or in other words, ensure you Max Size is greater than the largest side of your source image.

By the way, you can change this setting on the fly too, so if you have already laid out your map, and have these artifacts, you don't need to lay out your map again. Just change the Max Size of your source image and the result will flow through to your output.

I hope this helps!

(+1)

This was my problem hours ago! You have my thanks.

(+1)

This is great info for anyone to know, thanks for sharing.

thank you very much