Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Corrupted sprites in builds ONLY

Discussion in 'Editor & General Support' started by barjed, May 26, 2016.

  1. barjed

    barjed

    Joined:
    May 9, 2013
    Posts:
    70
    We started having this really strange issue out of the blue. Some sprites get corrupted but only in (Windows) builds. There are no problems when the game is run from the editor.

    Here's how the corrupted sprites look in the build. The one on the left works correctly, the one on the right is all messed up.



    It is a really puzzling problem and we have never encountered anything similar on this project for the last year. Furthermore this corruption issue started appearing on sprites that were fine just weeks ago. We tried every single solution we could think of. Our conclusions are these:

    • It's not a problem with the file itself. We tried deleting, copying, recreating from the source and nothing helps. The file is read correctly in the Editor and in every single software application as well.

    • It's not a problem with the import settings. Both of the icons in the picture above have the same settings and are identical in terms of size, file format, etc.

    • It's not related to the way the sprite is presented - the issue occurs both in regular Sprite Renderers and UI Image elements and is also presented when already present in the scene and when instantiated.

    • It doesn't seem to be hardware related. We tried building and running on various hw configurations including laptops. We tested on both dedicated GPUs (nVidias) and intergated Intel cards. We also tried updating drivers - no difference. All computers were running Windows 10 though.

    • The corrupted sprites really seem to have nothing in common in terms of their properties. The issue manifests on both transparent and opaque sprites, of various sizes and colour palettes.

    • Deleting the 'Library' folder and reimporting assets does not help. We tried this solution on two different computers.

    • The corrupted sprites work correctly when the scene that presents them is the first scene in the build order - this is utterly confusing. If the scene is loaded directly after the application runs everything is fine. If it's loaded into from the other scene however, it's broken.

    • We are on Unity 5.3 and it might be a problem related to this, however there is nothing like this in the Issue Tracker. We also couldn't find anything similar while searching through the internet forums. We tried building on 5.3.1 up to the recent 5.3.5 - no difference.
    Any assistance would be GREATLY appreciated.
     
  2. igrir

    igrir

    Joined:
    Jan 24, 2014
    Posts:
    16
    I had similar problem but it was build on Mac (I posted about that in here http://forum.unity3d.com/posts/2652110/). Have you tried to build on 64 bit? We did that and fortunately everything seems worked.
     
  3. barjed

    barjed

    Joined:
    May 9, 2013
    Posts:
    70
    Just checked. The sprites are still corrupted on x64 build :(
     
  4. soonk

    soonk

    Joined:
    Aug 4, 2013
    Posts:
    5
    @barjed any luck on this? Having a similar issue I think...
     
  5. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    200
    Got the same here as well, it happened to me after updating to 5.5.0
     
  6. boehmz1990

    boehmz1990

    Joined:
    Feb 2, 2017
    Posts:
    3
  7. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    200
    Hi @boehmz1990 I had seen that post, but unfortunately i can't turn off mip-maps cause our zoom system would be ruined completely. After I manually (reimport didn't work) reimport all the sprites, i still get once and then when building, some sprites (1-2 each time max) being ruined in the build. I really can't figure out what the problem is.
     
  8. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    We had this on Android recently. I believe the solution was to recreate the atlas.