Search Unity

Tile Map [Feature request] Palette tiles ordered like in tileset sprite

Discussion in '2D Experimental Preview' started by maximelore, Sep 16, 2016.

  1. maximelore

    maximelore

    Joined:
    Sep 16, 2016
    Posts:
    5
    The problem is that when spliced then imported in a palette, the order of the tiles is completely different from the image.
    This is particularly frustrating when you have elements made of multiple tiles.

    Since each tile is a intermediary asset, and seemed to take sprites in name order. I thought changing the names would solve the problem. However, you cannot control the size of your palette and thus cannot arrange them like you want.

    It would be nice to have your palette magically look like your sprite tileset. Or to have an easy way to arrange them.

    I didn't found a way to move tiles. So to modify the palette you have to select your tiles and draw them further. This is really time consuming.

    Here's how the palette looks like:

    Screen Shot 09-16-16 at 02.33 PM.PNG
     
    dirtycoder likes this.
  2. Johaness_Reuben

    Johaness_Reuben

    Unity Technologies

    Joined:
    Jan 27, 2016
    Posts:
    253
    Used to be able to drag the base texture and the tiles would ordered accordingly. This seems to be broken currently. We are making some major changes to the TileMap Palette and this issue should be fixed.
     
    WolfMountainGames likes this.
  3. maximelore

    maximelore

    Joined:
    Sep 16, 2016
    Posts:
    5
    Can't wait :)
     
  4. der_r

    der_r

    Joined:
    Mar 30, 2014
    Posts:
    259
    I haven't had a chance to check out Preview 2 yet, but this behaviour happened in Preview 1 when you selected all the tiles of a sliced tileset and pulled them over. If you drag'n'dropped the overarching texture file, all tiles would be organized like in the texture.
     
  5. Johaness_Reuben

    Johaness_Reuben

    Unity Technologies

    Joined:
    Jan 27, 2016
    Posts:
    253
    @maximelore My mistake, this behaviour still works in Preview 2. You can drag the base texture and the sprite will be organized as they are in the texture.
    There is a bug that it doesn't seem to work if the texture is just a single row of sprites which was what threw me off.
     
  6. chilon

    chilon

    Joined:
    Feb 10, 2019
    Posts:
    7
    I'm facing this issue with 2018.3.5 and it's extremely annoying.
     
  7. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    305
    Hi, could you file a bug with the Unity Bug Reporter with the texture that you are using and post the bug number here?
    That would be very helpful!
     
  8. chilon

    chilon

    Joined:
    Feb 10, 2019
    Posts:
    7
    The issue happened for about 10 hours, I woke up the next day and it stopped happening. Hmm. Is the Linux version of the editor much buggier or something?
     
  9. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    305
    That should not be the case and would be worse if the behavior for setting up the Tile Palette is not deterministic.

    Sending a bug report for reproduction would be helpful in tracking down this behavior!
     
  10. Threepwood

    Threepwood

    Joined:
    Jul 23, 2009
    Posts:
    86
    This issue is horrible. Just updated to 2018.3.14f1

    It makes tiles unworkable imo. Two things happen...You update your source texture to add new tiles. You go in and re-slice it. You then drag the base texture to the palette window...

    1) the palette window often goes whacky with tiles all over. It seems random
    2) the worst that happens is often the actual tilemap jumbles tiles. This means lots of work re-tiling things.

    Honestly guys you don't need a test case. It breaks easily with a 256x256 texture on a 16x16 grid and maybe 25 tiles on it. Add a few new ones, re-slice and re-import to the tile palette and boom - you're screwed.

    I've tried using "reuse" on the tile assets when saving them and everything I can think of. Either it's some fiddly Unity setting that's obscure or horribly broken.

    As it is the tile palette is anything but deterministic and the jumbling of actual tile map data is worse. I've been messing with tilemaps for 2-3 weeks now and have no solution. I thought maybe it was me being a few updates back but late 2018 should work flawlessly, right?
     
  11. Threepwood

    Threepwood

    Joined:
    Jul 23, 2009
    Posts:
    86
    Here's basically the solution I found and it's obv if you think about it.

    Whatever size tile atlas you are using, just be sure to fill it all in with magenta or some color, so when you slice it, you have all the sprites accounted for and all the tile assets created. From then on you will never have to mess with re-slicing or dragging a texture into the palette window. You'll just be updating a texture and Unity will do that automatically. This clears up a lot and keep the atlas 1:1 with your tile palette and your tilemap.

    However if you want to rearrange things on your atlas or tile palette, or re-slice or re-generate tile assets, then god help you.
     
    charleZTron likes this.