3
\$\begingroup\$

Unity has a wonderful Tile Palette feature. However after I drag and drop the sprites to the Tile Palette, the tiles are off-centered like so (Notice the white square, it's the cursor):

enter image description here

I've tried fiddling with the Cell Size/Gap within the Grid object, and the Tile Anchor from the Tileset object with no difference.

Although I can place the tiles right in the scene, it's a headache to re-arrange and place the tiles within the Tile Palette with this off-center tile issue.

Did anyone of you faced and solved this issue before? Perhaps I overlooked something?

\$\endgroup\$

2 Answers 2

7
\$\begingroup\$

I fixed it by:

1.) Deleting my current tiles in the tile palette.

2.) In the inspector, after selecting the sprite that I wanted fixed properly on the tile palette, I changed the sprite's pivot from "bottom left" to "center".

3.) Made sure to hit apply at the bottom of the inspector.

4.) Then dragged the updated sprite into the editor and it was then centered properly.

Hope this helps, its my first time ever posting something about Unity.

\$\endgroup\$
1
  • \$\begingroup\$ I think this is a suboptimal workaround, because the pivot location of tiles should be determined by considerations about the game mechanics, not based on a UI workaround. I hope this gets fixed in a future version of Unity. \$\endgroup\$
    – Angelorf
    Apr 12, 2020 at 10:34
1
\$\begingroup\$

If you want the sprite's pivots te remain off-center, then you should fix it the following way.

  • Find the prefab of the tile palette in your project view tile palette prefab
  • Double click it to open it in Prefab Mode.
  • Select the layer tile palette tilemap layer
  • In the Inspector, set the anchor (here left bottom) tile palette anchor

Thanks to the Unity forum

\$\endgroup\$
2
  • \$\begingroup\$ make sure to align images in every new line \$\endgroup\$
    – ronscript
    Apr 14, 2020 at 14:44
  • 1
    \$\begingroup\$ Is that a comment on the formatting of my answer, or a comment on how to deal with tilemaps? \$\endgroup\$
    – Angelorf
    Apr 15, 2020 at 23:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .