atlas tight packing, how to avoid overlap?

see the white and black stripes go inside the rect of the pink thing
6733351--775264--upload_2021-1-16_23-40-7.png
the result is that the image using the pink thing as sprite has some black and white stripe.
6733351--775267--upload_2021-1-16_23-40-26.png
it looks like if i edit the pink thing sprite to draw an outline by hand this goes away but that’s a lot of work
is there a setting to prevent that automatically without increasing padding?

Is this in the UI? SpriteRenderer shouldn’t have overlap, but a Canvas renderer uses a quad by default. If you enable debug view on an Image component you can check Use Sprite Mesh that should stop the overlap. You could also set Mesh Type to Full Rect in the sprite import settings. Generally I set the image to use the sprite mesh so my atlas’s are smaller.

1 Like

I get it it makes sense that they’d not automate sprite mesh use in UI, thanks for the tip, it works great now.