Search Unity

Empty tile skipping in grid slice not compatible with most Tilemappers

Discussion in '2D' started by Elo01, Mar 20, 2014.

  1. Elo01

    Elo01

    Joined:
    Mar 19, 2014
    Posts:
    3
    I just wasted 2 hours, thinking my tilemapper had a bug, so maybe I can save you some time.

    This is also a form of feedback, as this feature currently renders many popular tilemappers useless if you use spritesheets. A toggle button would be greatly appreciated

    http://i.imgur.com/U6nySFi.png

    In grid slice mode, unity is skipping all tiles that are empty / contain no pixels

    This means that the order / index of ALL following tiles shifts by -1 for each empty tile in the spritesheet

    The linked image clearly shows the issue. There's an empty tile, meaning unity skips it and all other tiles shift by -1. The used tilemapper behaves as expected and still counts empty tiles. This introduces completely unnecessary work, as you now have to make sure no spritesheet contains empty / completely transparent tiles
     
  2. Mighty-Professional

    Mighty-Professional

    Joined:
    Jan 24, 2014
    Posts:
    166
    I agree, this is a bit of a pain. Any solutions?

    I nominate this entry into the worlds biggest hack contest. If you are TRULY desperate this works.

    http://pastebin.com/bjffbB0N -> Drag on a object
    http://pastebin.com/nVcVf4bT -> Put in editor folder

    Generate your tiles normally. Select this script, drop your tileset in and hit Split Tiles.

    Viola, proper tiles.


    [Warning] The degree of this hack is equal to US national debt.


    Any real solutions would be nice.
     
    Last edited: Sep 9, 2014
  3. Mighty-Professional

    Mighty-Professional

    Joined:
    Jan 24, 2014
    Posts:
    166
  4. Mighty-Professional

    Mighty-Professional

    Joined:
    Jan 24, 2014
    Posts:
    166
  5. Shadeless

    Shadeless

    Joined:
    Jul 22, 2013
    Posts:
    136
    Hey, I haven't experienced this kind of issue. I use the Sprite Editor to cut the tiles I need and then create tile prefabs and tile them myself, with a TileMap script.

    But I experience a totally different issue, where Unity's camera is not pixel perfect and if he camera moves you can see pixel distortions on the tiles (pixels shifting left and right). Any more input would be appreciated. I've posted a temporary fix in one thread.
     
  6. Mighty-Professional

    Mighty-Professional

    Joined:
    Jan 24, 2014
    Posts:
    166
    I dont want to mix this thread up with other issues as they tend to get off topic and lose the original point. I have heard of that error a few times. I personally fixed it by setting the filter mode on the tileset to point. Either way there should be plenty of info around to fix it.
     
    avictorsa likes this.
  7. Otsego

    Otsego

    Joined:
    Jun 9, 2013
    Posts:
    5
  8. diego-vieira

    diego-vieira

    Joined:
    Mar 27, 2015
    Posts:
    32
    I am facing the same problem, I spent 10 votes on this. This should be on Unity long ago.
     
  9. G-Reusch

    G-Reusch

    Joined:
    Sep 28, 2013
    Posts:
    5
    My personal solution has been to put some pixels with an alpha value of 1 in the slices that are supposed to be empty. Shouldn't be noticeable in most cases and it prevents Unity from ignoring them.
     
    viridisamor likes this.
  10. joedurb

    joedurb

    Joined:
    Nov 13, 2013
    Posts:
    38
    super frustrating this is not an option still?
    Here i scribble tmeporary pixels to make sure my future mappings arent corrupted when we add to the tilesheet.

    SIMPLE: Ignore White Space?
     
  11. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    I totally agree with this. There should be option to keep the empty sprites.
     
    Ufol likes this.
  12. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    1,068
    There will be an update to the Sprite Editor in 2020.1 to improve slicing of such Spritesheets as well as adding on Sprites to the Spritesheet as you iterate on the artwork.

    upload_2020-2-28_14-21-2.png
     
    Ufol and castor76 like this.