Tile Palette gap in tile

Hi,
I have created a tileset in Gimp and imported into Unity.
I set the tileset sprite mode to ‘Multiple’ and opened the tileset in Sprite Editor.
I used the ‘Automatic’ option to slice the tiles. It worked perfectly.

The height is exactly detected to be 7 pixels, just like i drew it in Gimp. So, there are no invisible pixels.

But once i import these into Tile Palette, gap starts appearing above and below.

6112664--665555--Gap_TilePalatte.PNG

And this gap, also shows up in the game and in unity editor.

6112664--665558--Gap_InEditor.PNG

Can anyone please help.
Do let me know if more information is needed.

Each full tile in the tileset is 16x16 pixels HxW.
The ones from the above screenshots are partial tiles 7x16 HxW.
In Sprite editor, I have set the Anchors manually as i want them to be (Also captured in the above screenshots)
In Unity Editor, on the Grid settings, I have set the cell size as 0.16x0.16 as it seems to be the tile size as per unity. Setting it to higher values cause the tiles to appear in center of each cell. Setting it to lower values cause the tiles to overlap. (Setting it to 0.15x0.15 causes the same issue as 0.16x0.16. Only difference is the gap disappears and what seems to be a seam starts appearing between tiles)

Thanks
Joshua.

Shouldn’t the partial tiles be 8x16? Doesn’t 7 + 7 leave a 2 pixel gap? Or am I missing something?

1 Like

Hi
Thank you :slight_smile:
You were spot on :slight_smile:
Having tiles with height 7 caused some cell sizes to be 0.4375 (As it does not clearly divide 16)
Then the floating point imprecision too over and messed up the alignment.
Thank you very much :smile:

How do i mark this as answered!?