I am following a Unity 2D Action RPG tutorial on YouTube (Link) and recently finished the map tiling videos that used Tiled and Tiled2Unity. It was all going well until I moved the game file via Google Drive to my home laptop and brought up the game to work on it. When I played the game, I noticed what appears to be map tearing:
I tried to use the pixel snap technique on the tile map layers, but it did not do anything. I can’t apply pixel snap to the mesh layers, because, well, they are mesh layers. The map is not torn when using the original machine with the original game file, though I have not tried importing the exported game file to the original machine and opening it to check yet. Any fix without third party tools? Thanks.
UPDATE: I clicked the “Maximize On Play” button and it fixed the lines when playing the game, but it still shows up in the minimized game tab and when you hit play normally. I’m hoping the lines don’t actually matter when running the executable in the future.
I’m not an expert but just a pointer while you wait for an expert. It may well be to do with how you are handling differing screen sizes/aspect ratios.
Laptops often have 16:10 or 16:9 or even other shapes of screen.
I don’t use Unity but in Libgdx and other languages you need to cater for differing screen sizes with a Viewport.
Sorry I cant be more specific about Unity as I have no clue if that is built in or what they call it but most languages I’ve worked with have viewport and camera classes which go hand in hand. eg. A FitViewport would be supplied a Width and Height (that you specify) and would render everything to that exact size and then stretch the viewport to fill as much of the screen as possible.
Very interesting that you say that. I neglected to mention that when moving to a computer with the same monitor, the map had mysteriously fixed itself, so this may very well be the issue. Thank you for the input.
again, i dont know unity. but i expect it has one built in and that it is defaulting to stretch(or fill) the whole screen. Hopefully there will be a setting to change it to Fixed aspect ratio or just to specify the width and height of it