Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Large file after build

Discussion in 'General Discussion' started by Kandrbol, May 16, 2020.

  1. Kandrbol

    Kandrbol

    Joined:
    Aug 15, 2018
    Posts:
    117
    Hi. I have many sprites for animation in UI. In assets sprites is about 10 kB, but after build it is about 700 kB. Therefore my asset is 100 MB, but after build aplication is 350 MB. Why? Sprites are 98 % from it.
     
  2. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    u building for android or apple?
     
  3. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,616
    You probably imported your sprites in Unity as PNGs, or some other format which is compressed. These files don't end-up in your actual build, though. Whatever compressed file format you use to store sprites, Unity has to re-code the images to special formats that are compatible with render hardware. The compression used for these formats is often a larger file size than is possible with PNG or JPG.
     
  4. Kandrbol

    Kandrbol

    Joined:
    Aug 15, 2018
    Posts:
    117
    I build to android. Yes. That will be it. (Unity has to re-code the images to special formats that are compatible with render hardware. The compression used for these formats is often a larger file size than is possible with PNG or JPG.). I make game with MP4 videos. But after it, I found that they work badly after build. So I change MP4 to sprites animation. With PNG (about 100 kB and after to JPEG about 10 kB). But what was my surprise that it didn't help anyway. I must reduce the number videos.
     
  5. Kandrbol

    Kandrbol

    Joined:
    Aug 15, 2018
    Posts:
    117
    I did not realize that.