Search Unity

Resolved My tileset is "broken" for some reason?

Discussion in '2D' started by Proxima_Centauri, Oct 24, 2020.

  1. Proxima_Centauri

    Proxima_Centauri

    Joined:
    Oct 20, 2020
    Posts:
    42
    So I'm making a platformer game, and I'm using a tileset I made to make the ground. So I created the tileset (following a tutorial from Brackeys) and it works... kind of.

    The thing is, my tiles are drawing correctly in the scene and show correctly in the game, but the palettefor some reason appears outside of the grid and with some void spaces that were not in the tileset originally

    Strange Tileset.PNG

    (Here you can see, it appears correctly on the game, but, for some reason, it appears incorrectly in the palette's grid).

    I tried moving the pivot when slicing the tileset (it's all in an image, so I sliced it), but it doesn't work. Is this a bug or am I doing something wrong? It doesn't affect the game, but it's harder because I keep confusing and choosing the incorrect tile
     
  2. webox

    webox

    Joined:
    Aug 27, 2015
    Posts:
    72
    Look for your pallette asset in the project explorer, double click it and open it in the prefab editor, then go to the hierarchy, expand it and pick the Layer1 game object. In the explorer, you'll see something like this

    Anchor.png

    Check if the tileAnchor values are set correctly, they must match what you've set in the sprite editor when you sliced it, that could be the issue or at least point you into the right direction
     
    Proxima_Centauri likes this.
  3. Proxima_Centauri

    Proxima_Centauri

    Joined:
    Oct 20, 2020
    Posts:
    42
    Yeah, it solved my problem, thank you very much!
     
    webox likes this.
  4. webox

    webox

    Joined:
    Aug 27, 2015
    Posts:
    72
    Awesome! Glad it worked!
     
    Proxima_Centauri likes this.