Image Image Image Image Image Image Image Image Image Image
Scroll to top


Auto Extrude Tilesheet or Spritesheet in Unity for Free

Auto Extrude Tilesheet or Spritesheet in Unity for Free

Hey everyone,

Long time no post, recently I have been working on some other projects or nothing at all but came by this fix online and thought I should share it.

If you work with Unity at all (and I am guessing you do or you would not have found yourself at this page) you know how frustrating it is dealing with the way Unity handles 2D sprites and tiles.  The only way to get rid of the little lines that sometimes show on the top or bottom of a given sprite is to extrude the tiles but keep the settings in Unity the same.

The only solutions I found when trying to solve this cost money like TexturePacker by Code+Web.  I am guessing that is a really nice tool but I decided the problem wasnt worth money and worst case I could manually do it (too much time) or make a little program to do it for me (also a lot of time).

I stumbled on this post from 2011 and it had the perfect solution.

If you follow the link above there is a nice little editor package, if you use it, it will auto extrude a tileset or spritesheet within unity for you.

  1. Download the package from the link
  2. Add the package to your project
  3. Select your tilesheet/spritesheet within Unity
  4. On the Menu select Mudloop (if you dont see this between Tools and Window, click around the menus a bit)
  5. Select Texture Padder
  6. Change or Accept the default options
  7. Select a spot to save the new tilesheet/spritesheet
  8. Done

Here is an example, on the left you have the original 32 by 32 pixel tile.  Note the borders on the top, right, and bottom. (it was on the edge of the sheet so it has no tile to the left of it)  On the right is after using the script, it is now a 34 by 34 pixel tile and has added a 1 pixel border that extrudes the original tiles borders.

I have been considering posting more Unity tutorials and logging some sort of Journal on the game I am working on…so maybe soon the site will see some more activity.

Here is a small clip to show where I am at with that.


4887 Views // February 18, 2018