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

[Solved] This Image is Cursed

Discussion in 'General Graphics' started by livelostlasvegas, Feb 4, 2020.

  1. livelostlasvegas

    livelostlasvegas

    Joined:
    Jan 16, 2020
    Posts:
    6
    I'm getting this error after upgrading to Unity 2019.3.

    Could not create asset from [Asset Path and Name]: File could not be read

    The file looks like this in the editor (it has no thumbnail): upload_2020-2-3_21-19-46.png

    I tried to open the same png from a previous version of my game and replace that one but it's still not working. I even opened the previous version's file in Photoshop and saved a new image with a different name and it's still not working. I have a lot of graphics in my game that are suddenly not working or really messed up after upgrading, please help!

    It's just a typical PNG sprite. The only settings I've changed is to change it from Default to Sprite in the editor. I'm not using any asset bundles or asset database or whatever, it's just a sprite!

    Please help me with this I've tried to revert my game to a previous version but this issue happens every time I update to 2019.3.
     
    sean244 likes this.
  2. livelostlasvegas

    livelostlasvegas

    Joined:
    Jan 16, 2020
    Posts:
    6
    PRAISE THE LORD I've found out how to exorcise this thing. It was breaking even if I opened the PNG and copied just the image with no layers or anything to a fresh file. It was breaking even if I imported it to a fresh Unity project. I was out of my mind. I was fearing for my life. I tried to upload the devil image here so I could see if any of you could figure out what the hell was up with it...then it told me I couldn't post it because it was too large. What? This tiny, barely 200x200 pixel image that should only be a few kilo - holy crap it's 15 MB HOW.

    I still have no idea what the hell is in this image to make it that huge but I opened it back up in Photoshop and used PNG export instead of just Save As and made sure the exported file was only going to be like 7kb.

    Now it works! It is pure again!
     
  3. JConcha

    JConcha

    Joined:
    May 18, 2016
    Posts:
    3
    I'm running into a similar issue. I'm trying to copy an sample from my psd, paste it into an already existing png and pressing save, but this makes the filesize jump from 3kb to 12,780kb!!!! On top of that, Unity can't read the file. Doing the quick export option from photoshop works, but that requires several extra steps. I feel like Unity used to read pngs saved from photoshop this way and may photoshop changed something about the way they save pngs by default.

    I wouldn't really call this problem solved since you need to do a tedious work around.
     
  4. ritesh_khokhani

    ritesh_khokhani

    Joined:
    Jun 26, 2013
    Posts:
    47
    Had similar issue after upgrading project from unity 2019.2.21 to 2020.2.0.
    Fixed issue by compressing image to lower size. Issue generated with the image size greater than 10mb.

    Hope this might help someone to fix the issue.
     
  5. ScottAdams

    ScottAdams

    Joined:
    Nov 23, 2016
    Posts:
    72
  6. NicoLeyman

    NicoLeyman

    Unity Technologies

    Joined:
    Jun 18, 2019
    Posts:
    33
    This bug was closed as "Won't Fix" because the PNG file that failed to load wasn't valid according to the PNG specification. I've passed on feedback internally regarding the IssueTracker since the reason we didn't fix something should be shared publicly (at least in this case).

    I tried importing a PNG that's larger than 10 MB and the only failure I was able to trigger was when the PNG was still being written to while Unity was trying to import it. I'll look into filing a bug for that one.

    If anyone has a file that doesn't reimport correctly after it's been copied/exported completely then please share it so we can try to reproduce it.
     
  7. NicoLeyman

    NicoLeyman

    Unity Technologies

    Joined:
    Jun 18, 2019
    Posts:
    33
    We couldn't add/show Won't Fix resolution notes back in 2018 so this shouldn't be a problem anymore.