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. Dismiss Notice

Building games with Unity Pro vs Unity Free

Discussion in 'Editor & General Support' started by SkyTou, Jun 23, 2014.

  1. SkyTou

    SkyTou

    Joined:
    Nov 28, 2013
    Posts:
    8
    Hi ,

    I encountered this strange issue recently and I could not find a logical explanation .

    I have a game with 10 levels and the asset folder size is 600 Mb , the problem occurs when taking build .

    The build size on taking android build from Unity Pro 4.5.0f comes to 180Mb . But the same project when taken build from Unity free 4.3.0f the build size is only 42Mb . What could be the problem and any one can help me with a solution .


    Thanks in advance
     
  2. ElvisAlistar

    ElvisAlistar

    Unity Technologies

    Joined:
    Oct 2, 2013
    Posts:
    226
  3. SkyTou

    SkyTou

    Joined:
    Nov 28, 2013
    Posts:
    8
    HI ElvisAlistar

    I have tried it already, took build with different Stripping Level , optimized mesh and used .net subset 2.0.
    It is giving only changes of few kb not much . Still have the problem the free version of 4.3 gives more compressed build.

    To check if it was a isolated case I sent the project to my friend who also has a Pro version subscription of Unity 4.5 and he got the same problem . His pro machine build was almost 90Mb more than the free version build.
     
  4. ElvisAlistar

    ElvisAlistar

    Unity Technologies

    Joined:
    Oct 2, 2013
    Posts:
    226
    Oh, I read you original post the wrong way. Only now I noticed that the free version produces a smaller build size. In that case, I will get back to you if I can find out a reason why.
     
  5. ElvisAlistar

    ElvisAlistar

    Unity Technologies

    Joined:
    Oct 2, 2013
    Posts:
    226
    So, one thing someone here noticed is that you are comparing 4.5 Pro with 4.3 Free. What happens when you build the same project with 4.5 Free?
     
  6. SkyTou

    SkyTou

    Joined:
    Nov 28, 2013
    Posts:
    8
    Hi ,

    I never tried that, we updated our pro version machines and kept the free version machines as back up . Will try now and tell you the result.
     
  7. SkyTou

    SkyTou

    Joined:
    Nov 28, 2013
    Posts:
    8
    Tried with Unity 4.5 free version and the result is the same , free version compresses the build better x_x

    proVfree.jpg
     
  8. ElvisAlistar

    ElvisAlistar

    Unity Technologies

    Joined:
    Oct 2, 2013
    Posts:
    226
    Hi, can you try building the AngryBots demo that comes with the Unity installer? We tried that and there is no difference between the build sizes. If you see no difference with AngryBots either, then you have something in your project that causes this huge difference in build size. It might be something buggy on our end, but we will need your project submitted through a bug report in order to try and reproduce it on our end.
     
  9. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    When you make a build Unity reports in the log the size of various flavours of asset. Might be worth posting those editor log messages. So, for example, a trivial test project I just built showed:

    Code (csharp):
    1. ***Player size statistics***
    2. Level 0 'Assets/scene.unity' uses 74.0 KB compressed / 0.5 MB uncompressed.
    3. Total compressed size 74.0 KB. Total uncompressed size 0.5 MB.
    4.  
    5. Textures      0.0 kb    0.0%
    6. Meshes        0.0 kb    0.0%
    7. Animations    0.0 kb    0.0%
    8. Sounds        0.0 kb    0.0%
    9. Shaders       0.0 kb    0.0%
    10. Other Assets  0.4 kb    0.2%
    11. Levels        9.5 kb    4.6%
    12. Scripts       11.4 kb    5.5%
    13. Included DLLs 138.0 kb    66.8%
    14. File headers  47.3 kb    22.9%
    15. Complete size 206.6 kb    100.0%
    16.  
    17. Used Assets, sorted by uncompressed size:
    18.  0.3 kb    0.1% Assets/Resources/data.txt
    19.  0.1 kb    0.1% Built-in Material: Default-Diffuse
    20.  0.1 kb    0.0% Assets/mylerp.js
    21.  0.1 kb    0.0% Assets/myUri.js
    22.  0.1 kb    0.0% Assets/bce0011.js
    23.  0.1 kb    0.0% Assets/texter.cs
    24.  0.1 kb    0.0% Assets/myWsa.cs
    25.  0.1 kb    0.0% Assets/contain.cs
    26.  0.1 kb    0.0% Assets/SQLite.cs
     
  10. SkyTou

    SkyTou

    Joined:
    Nov 28, 2013
    Posts:
    8
    Code (CSharp):
    1.  
    2.  
    3. Unity Pro 4.5
    4.  
    5. System memory in use before: 48.5 MB.
    6. Unloading 0 Unused Serialized files (Serialized files now loaded: 0 / Dirty serialized files: 0)
    7. System memory in use after: 48.6 MB.
    8.  
    9. Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 1822.
    10. Total: 5.078074 ms (FindLiveObjects: 0.224613 ms CreateObjectMapping: 0.019080 ms MarkObjects: 4.036683 ms  DeleteObjects: 0.009372 ms)
    11.  
    12.  
    13. Textures      40.3 mb     10.5%
    14. Meshes        6.8 mb     1.8%
    15. Animations    0.0 kb     0.0%
    16. Sounds        6.9 mb     1.8%
    17. Shaders       2.3 mb     0.6%
    18. Other Assets  186.4 kb     0.0%
    19. Levels        318.9 mb     83.1%
    20. Scripts       195.3 kb     0.0%
    21. Included DLLs 4.1 mb     1.1%
    22. File headers  4.1 mb     1.1%
    23. Complete size 383.7 mb     100.0%
    24.  
    25. Unity Free 4.5
    26.  
    27. System memory in use before: 48.4 MB.
    28. Unloading 0 Unused Serialized files (Serialized files now loaded: 0 / Dirty serialized files: 0)
    29. System memory in use after: 48.5 MB.
    30.  
    31. Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 1819.
    32. Total: 5.160086 ms (FindLiveObjects: 0.226956 ms CreateObjectMapping: 0.019080 ms MarkObjects: 4.054760 ms  DeleteObjects: 0.012050 ms)
    33.  
    34.  
    35. Textures      40.3 mb     51.2%
    36. Meshes        10.5 mb     13.3%
    37. Animations    0.0 kb     0.0%
    38. Sounds        6.9 mb     8.8%
    39. Shaders       2.3 mb     2.9%
    40. Other Assets  193.6 kb     0.2%
    41. Levels        10.3 mb     13.1%
    42. Scripts       195.3 kb     0.2%
    43. Included DLLs 4.1 mb     5.2%
    44. File headers  4.0 mb     5.0%
    45. Complete size 78.8 mb     100.0%
    46.  

    Here is the snap shot of the build report . There seems to be change in the size taken by levels.

    @ElvisAlistar - If this log does not help then I will send the full project and file a bug report so you can take a look.
     
  11. ElvisAlistar

    ElvisAlistar

    Unity Technologies

    Joined:
    Oct 2, 2013
    Posts:
    226
    All right, I managed to reproduce this on our end. The information about the Levels taking up most space helped. Originally, I tried building Angry Bots with one scene, so the apk size was similar in both Free and Pro. But, after looking at your log files, I duplicated the scene 10 times and the resulting apk size in Pro is twice as big as the one in Free. I submitted a bug report and let's hope it gets fixed as soon as possible.
     
  12. SkyTou

    SkyTou

    Joined:
    Nov 28, 2013
    Posts:
    8
    We have a client project due for release this week end :( , any chance of the bug getting fixed before that .


    And thanks for your time helping me figure this out .
     
  13. ElvisAlistar

    ElvisAlistar

    Unity Technologies

    Joined:
    Oct 2, 2013
    Posts:
    226
    OK, got an answer for you. It is not a bug! You have to disable Static Batching.

    So, static batching is a Pro-only feature, so by default it's disabled in Free. That explains why the player size is bigger only in Pro. There's a pretty good explanation of what that does here http://answers.unity3d.com/questions/593206/how-static-batching-works.html

    So, go to your Player Settings for Android and uncheck the Static Batching box. The resulting apk size should be comparable to the one you're getting with Unity Free.

    Let me know if that worked for you!
     
    SkyTou and Graham-Dunnett like this.
  14. SkyTou

    SkyTou

    Joined:
    Nov 28, 2013
    Posts:
    8

    Yep that worked , thanks for pointing it out . Such a silly mistake , thanks for your time and hope this thread helps some one else .
     
    Graham-Dunnett likes this.