Search Unity

Lower MB size of the game

Discussion in 'General Discussion' started by truthseeker089, Jun 16, 2019.

  1. truthseeker089

    truthseeker089

    Joined:
    May 6, 2019
    Posts:
    61
    hi guys is there any way you can lower the MB size of your game? after i imported and set up the animation of just 1 character, my MB size jumped up from 77mb to 90mb!.....I am hesitant in using low pixels though.
     
  2. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    5,820
    Without more information, like what kind of art style you're using and how you're accomplishing it, we can't offer any likely actionable advice.
     
  3. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,275
    • is code stripping option.
    • reduce your texture size or use sprite packer
    • split your game content in separate asset bundles
    • reduce sounds compression, also check they have no blank at the start and the end, use audacity to remove blanks
     
  4. truthseeker089

    truthseeker089

    Joined:
    May 6, 2019
    Posts:
    61
    just 1 spritesheet caused me 54 MB lol i was trying to use Aekashics game art
     
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    14,380
    Check the asset's import settings. There are options to configure how it is compressed.
     
  6. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    4,009
    Ryiah likes this.
  7. truthseeker089

    truthseeker089

    Joined:
    May 6, 2019
    Posts:
    61
    like just for this 1 animation sheet it's gonna cost me 55mb! .......
     

    Attached Files:

  8. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    286
    I just checked a png portrait of 4096x4096 is already at 13mb. I'm guessing your sprite sheet has a bigger dimension than my picture, so I guess that 55mb is reasonable-ish if you're aiming for high quality sprite.
     
  9. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    12,019
    Note that Unity's internal image formats are not the same as the source formats you provide, and use completely different compression techniques. They're designed for high performance on GPU rather than low size on disk.

    After a build the Editor log shows the size of each asset from largest to smallest. That'll show you where to focus size optimisation efforts.
     
    Ryiah and Peter77 like this.
  10. truthseeker089

    truthseeker089

    Joined:
    May 6, 2019
    Posts:
    61
    thanks guys but is there any way I could lower the 55mb into, say, 4-10mb? I tried the tinypng and another compression app but it won't compress a file beyond 6mb...
     
  11. truthseeker089

    truthseeker089

    Joined:
    May 6, 2019
    Posts:
    61
    now this is a surprise, I just created this project without anything in it except for a camera and yet it already has 8mb on it...I am using Unity 5.6 for 32 bit by the way...
     

    Attached Files:

  12. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    14,380
    Completely normal. Unity's engine is around 8MB.
     
  13. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    4,009
    Btw, he isn't talking about the build, but about the Unity project directory that contains Assets, Library, Temp, and so one according to the screenshot.
     
    Ryiah and angrypenguin like this.
  14. truthseeker089

    truthseeker089

    Joined:
    May 6, 2019
    Posts:
    61
    and then I added a 1mb file guess what....it jumped into 38mb...Im only planning to create a 2d game with 50-90mb and i already have 38mb without doing anything yet....sorry guys this is my first time to and Ive been here for a lil over a month...I also noticed I downloaded an asset in the asset store, it had 119mb unfortunately I messed it up so I deleted it and reimported the file, then when i checked, it had 400+mb on it eventhough it wasnt updated....
     

    Attached Files:

  15. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    14,380
    Like @angrypenguin mentioned the formats used to store a file in your project are different from the formats used when you build your project.

    Open the project folder and you'll see a number of sub-folders. One of those is a cache that exists to speed up the process of playing your game from within the editor. When Unity builds your project it will take those cached files and turn them into a format that it can handle which will have a completely different file size.

    Just as an example I'm working on a project that has a folder size of 32GB. Current build size is around 1GB.

    Create a build and see what the size is. Ignore the project folder size. It won't tell you anything.

    Ah. Thanks. I didn't look too closely. I thought he was building and not just pointing at the project folder.
     
    Peter77 and angrypenguin like this.
  16. truthseeker089

    truthseeker089

    Joined:
    May 6, 2019
    Posts:
    61
    32gb??? what have u been doing? lol thanks for clarifying ryiah I just got worried because Unity closes often when I add animations I thought it has to do with the project file size I think ill be okay now thank u guys!
     
  17. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    14,380
    Working with huge mesh animation files. Once they're converted into a format Unity uses they shrink way down. Worst part is having to get them from version control. Takes forever with my lousy connection.
     
  18. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    2,426
    Just for the sake of comparison, a new empty 2D project created with 2019.1.6f1 (64 bits) already weighs 33 mb; a 3D one weighing about 56 mb. ;)