Problems with vertex snapping, 2D peoject Unity 5

I thought I posted this yesterday, but I can’t seem to find it (yes I looked for my post via my profile). So sorry if this becomes a double post. Anyway~

I jumped back into Unity after a somewhat long hiatus in the world of Blender, and decided to re-import a project that I was working on in Unity 4.x, piece by piece into Unity 5 (I need the practice anyway).

I’m using a sprite sheet 1536 X 1536 and I sliced it into 512 X 512 tiles. I haven’t changed the scale of the tiles, they are all default 1,1,1. I am using the v key to vertex snap the tiles.

The tiles vertex snap as you would expect when I do single tiles, but if I bulk duplicate and snap, it leaves about a pixel wide gap at the 15th or so tile. I only noticed it on the X axis but haven’t tried to duplicate the problem on the Y axis.

Another problem I’m having is I have tiles that lay on top of some other tiles. I have already set the layer value so they stay “on top” of the other tiles. I noticed that when I snap them into place I start to run into slight offset problems.

Usually when you vertex snap you have to move the mouse to the somewhat extreme to get it to snap to the next vertex. What is happening though is when I snap the tiles on top of other tiles it causes the mouse to become a bit sensitive in that area and starts offsetting my tiles by about 0.02 in either the X or Y axis. I noticed the square on the gizmo also blurs and sharpens when this happens.

I don’t remember running into these issues in the earlier release of Unity.

So, is this some kind of feature I have to disable/tweak? If so, how would I go about changing it? Or is this a bug I should report?



I removed the previous post I had on this problem, the mods finally approved it after 20+ hours so I thought it was MIA. I’ll keep this one instead.

Scroll down to TLDR Solution if you just want a solution and rather not read.

I had the same issue, although it didn’t wait for 15 sprites to show spacing. The issue was random for me, sometimes spacing showed, and sometimes it didn’t. But it was guaranteed to show at some point for EVERY vertex snap. For me, this is unacceptable in game.

I spend several hours troubleshooting, trying all types of different scenarios Texture Atlases (Sprite Sheets) and Single Sprite Mode - sprite on an individual Texture.

From my troubleshooting my findings were

The issue OCCURS when:

  1. You use a sprite from a Sprite Sheet / Texture Atlas, and that Sprite does not take up the entire width or length (depending on where you actually want to snap to) of the Sprite Sheet / Texture Atlas

The issue does NOT OCCUR when:

  1. You use a sprite that takes up the entire width or length (depending on where you actually want to snap to) of the Sprite Sheet / Texture Atlas it is on

  2. You use a sprite that has its own Texture (Single Sprite Mode).

It seems to me that Multiple Sprite Mode is flawed in terms of vertex snapping, unless your sprite actually takes up the width and length of that sprite sheet.

TLDR Solution

  1. Use individual Textures for your Sprites

    (Unity 5.0 automatically creates one Sprite Atlas when building the game, so creating Sprite Atlases are no longer necessary for performance reasons). I realize it may be necessary for other reasons.

  2. If you must use Sprite Sheets -

    a. Have the sprite take up the entire width or length of the Sprite Sheet depending on which axis you’re snapping to

    b. Scripting - above my pay grade