Search Unity

Sprite Automatic Slice not working properly

Discussion in '2D' started by Green11001, Jul 24, 2021.

  1. Green11001

    Green11001

    Joined:
    Apr 14, 2018
    Posts:
    397
    I have a strange issue that started occurring with Unity recently (not specific to one project or example, and hadn't occurred until recently in which it almost consistently occurs with every sprite sheet). The automatic slice is improperly cutting out shapes, sometimes making cuts out of nothing, etc. This also doesn't seem to be specific to a version of Unity, either. I thought there might be hidden transparency in the image, but looking closely I don't see anything there. Why is this occurring? Am I just misunderstanding something about automatic slice? Or maybe I accidentally set some setting to make it not work? Its not a serious issue since I can manually edit it, but its quite annoying. (the images are unedited results from automatic slice, the cutouts should not cover the transparent area)
    Image1.PNG
    Image2.PNG
     
  2. ed_s

    ed_s

    Unity Technologies

    Joined:
    Apr 17, 2015
    Posts:
    165
    Hi, that's very odd. What version of Unity are you using?

    Could you submit a bug report with a sample project/sprite sheet to help us understand this better? If you do submit a bug report, please let me know the bug # and we can look at it quicker. Thanks!
     
  3. Green11001

    Green11001

    Joined:
    Apr 14, 2018
    Posts:
    397
    I just made a new project on Unity 2020.3.11f1 and imported these sprites

    For some reason the sample cannot be previewed but it should be the png of the spritesheet copied directly from the project after I imported it (I can't seem to upload the meta file though)

    Also im not sure if this is version specific

    I haven't submitted a bug report yet, I'm still second guessing if there's just some transparency im somehow missing or if my unity download just got corrupted somehow
     

    Attached Files:

  4. Green11001

    Green11001

    Joined:
    Apr 14, 2018
    Posts:
    397
  5. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,464
    So while it may be a bug, you can fix it quickly. You can click the squares it thinks are sprites and remove them. You can also adjust the size of them and then hit apply again. Just a temp fix if you need it
     
  6. Green11001

    Green11001

    Joined:
    Apr 14, 2018
    Posts:
    397
    I know, although I'd like to get to the root of the problem because its been quite annoying
     
  7. ed_s

    ed_s

    Unity Technologies

    Joined:
    Apr 17, 2015
    Posts:
    165
    Hi, thanks for the sample. When I first imported your sample sprite into a project, it sliced fine. But I've tried it again with a brand new project and I'm getting the same issue you're getting.

    Note: FYI, for my first attempt to repro the issue, the Max Size was set to 8192 and it sliced correctly.
     
    Last edited: Aug 2, 2021