Search Unity

Feedback Tight Packing in Sprite Atlas issue

Discussion in '2D' started by HungTr, Jun 27, 2019.

  1. HungTr

    HungTr

    Joined:
    Jun 16, 2017
    Posts:
    3
    I have a problem with Sprite Atlas when I use a sprite which packed in an atlas for Canvas UI.
    My case: enable Tight Packing
    Reproduce: I play the game, instantiate a new UI Image which uses a sprite in the atlas. It causes an issue like the image below if I disable Tight Packing and replay, the problem resolve.
    Screen Shot 2019-06-27 at 16.53.40.png
    my setup
    Screen Shot 2019-06-27 at 16.55.46.png
     
  2. HungTr

    HungTr

    Joined:
    Jun 16, 2017
    Posts:
    3
    still need your help.
     
  3. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    644
    If the sprites are used for UI , please disable TightPacking as I believe UI may not support tight meshes as it renders as quads. If possible please use a different atlas for UI sprites.
     
    Gotama likes this.
  4. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    It should be supported according to the following changelog:
    https://unity3d.com/unity/beta/unity2018.3.0b4
     
    ROBYER1 likes this.
  5. HungTr

    HungTr

    Joined:
    Jun 16, 2017
    Posts:
    3
    Thank you very much.
     
  6. hippogames

    hippogames

    Joined:
    Feb 5, 2015
    Posts:
    233
    Not supported yet!
     
  7. hippogames

    hippogames

    Joined:
    Feb 5, 2015
    Posts:
    233
    Venkify hi, do you know when will UI support Tight packing? I'm on Unity 2019.4.15 and it still has artefacts in UI for Tight packed sprites.
     
  8. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    Do your Sprite and Image settings match? If your Sprite uses Tight packing, then your UI Image Component must use "Use Sprite Mesh".

    upload_2020-12-7_17-26-31.png