Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Unity 2022.2 is now available as the latest Tech release.
    Dismiss Notice
  3. We are making some changes to the DOTS forums.
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Automatic texture padding

Discussion in 'iOS and tvOS' started by mudloop, Jan 25, 2011.

  1. mudloop


    May 3, 2009
    Hi all,

    I created a script that adds borders to tiles in a tileset texture. This is useful against edge bleeding.
    This will be part of the next UniTile release, but I decided to give it away for free as well.

    Just import the unitypackage, and you should get a new menu item (sometimes this doesn't show up right away, so you have to click somewhere on the menu first).

    Please note that this will create a new texture at a different size, so it may not be "power of two" anymore - so you should take that into account when designing the tileset.
    Your texture should have Read/Write enabled and be ARGB32, RGB24 or Alpha8 (but Unity will tell you if it's not correct)

    I've only tested this on one tileset, so if anyone encounters any problems, please let me know.

    Here's a tileset (by

    (The tileset was doubled in photoshop because the tiles were very small)

    Here it is with a 2 pixel border around each tile:

    And here's a more extreme version with 16 pixels added on each side, just to show what it does:

    Edit: And here I've highlighted the stuff that has been added in black, so you can see that the original tiles are still there, they have just been extruded to each side:



    Attached Files:

    Last edited: Jan 25, 2011
    florianalexandru05 likes this.