If I try to grid slice a sprite that takes up the full height of its grid, it does not display properly when I run the game. For example, this is a grid of 9 sprites, each one 64x64:
If I try to display the middle sprite, this is what it looks like in-game:
The texture appears to be off by 1 pixel in the Y axis. Has anyone else run into this?
I’ve recently run into this issue as well, but have yet to find a fix for it.
What’s more, I’ve been trying to make a procedural polygon collider script to allow for easier on-the-fly map generation without setting up a huge folder of prefabs, and have come across an odd discovery.
Using play mode in the editor itself, the rogue pixels don’t seem to come up, and the system works as intended:
However, upon building and running a standalone executable on every resolution I’ve tested, the extra pixels show up and, as expected, the colliders go haywire:
I have tried modifying the pivot point location of the sprites in the editor to see if it’d have any effect, but it seems to turn out the same regardless.
Is there really no fix to this since March? This seems like a serious issue since it completely undermines the concept of grid slicing at all. Like, I have a perfect 32x32 unit grid set up in gimp, but it seems to slice parts of tiles from all four sides in Unity.
EDIT: Okay, apparently you just need to change to the “Point” Filter Mode to fix these kinds of issues.