assets
[Tilemap] Atlas Slicing Misalignment: Grid Display Errors Fixed
Solution
Unity 2021.x - Unity 6.3.x
Published Tue, Mar 17
When importing a texture for a Tilemap, the entire atlas is treated as a single tile within the Tile Palette. This occurs because the texture asset is not sliced, causing multiple tiles to occupy a single grid cell despite the Grid Cell Size settings.
The issue occurs because the Tile Palette interprets the entire texture as a single Sprite asset by default. To resolve this, the Sprite Mode of your texture must be adjusted to allow partitioning into individual sub-assets.
- Select your texture asset in the
Projectwindow. - Locate the Sprite Mode property in the
Inspectorand change it fromSingletoMultiple. - Click
Applyat the bottom of theInspector. - Open the
Sprite Editorwindow. - Select the
Slicedropdown, set theTypetoGrid By Cell Size(orGrid By Cell Count), and enter the dimensions of your individual tiles. - Click
Slice, then clickApplyin the top-right corner of theSprite Editor. - Drag the resulting sliced sub-assets into your
Tile Paletteto create theTileassets.
Additional Tips:
- Ensure the
Pixels Per Unit(PPU) matches your tile dimensions to maintain a 1:1 ratio with theGridCell Size. - If tiles appear with bleeding edges, set the
Filter ModetoPoint (no filter)andCompressiontoNone. - For automated workflows, consider using the
Sprite Custom Physics Shapeif your tiles require complex collision bounds.
TL;DR
The Sprite Mode must be set to Multiple to allow for manual or grid-based slicing within the Sprite Editor.
Related Posts Haven't quite found a solution to your problem? We think these posts might help you.
[Vector Graphics] Referencing SVG Assets via C# Scripts[Canvas System] Duplicated UI Assets: Awake Initialization Skip[Editor] Enable Keep Folders on Top Sorting in macOS Project Tab
Content inspired by a Unity discussion post.